ADT fallback: Accept headers for FUNC; G0189 accepted; regen2 results

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
Kral
2026-10-03 16:31:03 +02:00
parent 428b3565b2
commit 7510131a7d
335 changed files with 12047 additions and 5545 deletions

View File

@@ -83,10 +83,11 @@ class AdtClient:
"dataname=com.sap.adt.lock.result"))
lh = re.search(r"<LOCK_HANDLE>(.*?)</LOCK_HANDLE>", t).group(1)
try:
# FUNC needs an Accept header (PROG does not): "Accept header missing" (G0189)
self._req("PUT", f"{uri}/source/main?lockHandle={lh}", source,
dict(st, **{"Content-Type": "text/plain; charset=utf-8"}))
dict(st, **{"Content-Type": "text/plain; charset=utf-8", "Accept": "text/plain"}))
finally:
self._req("POST", f"{uri}?_action=UNLOCK&lockHandle={lh}", None, st)
self._req("POST", f"{uri}?_action=UNLOCK&lockHandle={lh}", None, dict(st, Accept="*/*"))
body = ('<?xml version="1.0" encoding="UTF-8"?><adtcore:objectReferences '
'xmlns:adtcore="http://www.sap.com/adt/core">'
f'<adtcore:objectReference adtcore:uri={quoteattr(uri)} adtcore:name={quoteattr(name)}/>'