fix(ddic): create 命令消费 JSON description(--description 优先→JSON→回退名);upload testclasses XML 包裹通道(S4T 三轮实证);SKILL 错误速查表 +4 条 NW740 实证(ADT 创建不持久化文本/classes 激活空响应/unknown comments/STRG+comptype 陷阱)
This commit is contained in:
@@ -42,6 +42,7 @@ class SourceMixin:
|
||||
source: str,
|
||||
lock_handle: str,
|
||||
corr_nr: str | None = None,
|
||||
content_type: str | None = None,
|
||||
) -> bool:
|
||||
params: dict[str, str] = {}
|
||||
if lock_handle:
|
||||
@@ -49,8 +50,9 @@ class SourceMixin:
|
||||
if corr_nr:
|
||||
params["corrNr"] = corr_nr
|
||||
url = f"{self.host}{src_uri}"
|
||||
hdrs = self._headers("text/plain; charset=utf-8")
|
||||
logger.info("SET SOURCE: PUT %s (%d chars)", url, len(source))
|
||||
ct = content_type or "text/plain; charset=utf-8"
|
||||
hdrs = self._headers(ct)
|
||||
logger.info("SET SOURCE: PUT %s (%d chars, ct=%s)", url, len(source), ct)
|
||||
resp = self.session.put(
|
||||
url, headers=hdrs, params=params, data=source.encode("utf-8")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user