fix(http): disable HTTP/2 to fix undici decompression issues#74
fix(http): disable HTTP/2 to fix undici decompression issues#74shamashel wants to merge 2 commits intoopenclaw:mainfrom
Conversation
|
Someone is attempting to deploy a commit to the Amantus Machina Team on Vercel. A member of the Team first needs to authorize it. |
|
Closing as obsolete.\n\n- already removed (see entry in released 2026-02-13: "HTTP: remove from Undici agent to prevent on Node.js 22+").\n- Undici v7 default is anyway, so the effective fix is already in place by not setting it.\n- PR is currently merge-conflicting; rebasing just to land a redundant change doesn’t seem worth it.\n\nIf the original issue still reproduces on CLI >= 0.6.1 (2026-02-13), let’s capture a minimal repro + add a regression test focused on compressed JSON responses (HTTP/1.1 + HTTP/2) instead of toggling H2. |
|
Follow-up (previous comment lost some inline code formatting due to shell backticks): Closing as obsolete.
If the original issue still reproduces on CLI >= 0.6.1 (2026-02-13), suggest: minimal repro + regression test around compressed JSON responses (HTTP/1.1 + HTTP/2). |
Fixes openclaw/openclaw#3637
Summary
When undici fetches compressed content over HTTP/2, it fails to decompress the response, causing JSON parse errors:
This change disables HTTP/2 (
allowH2: false) to force HTTP/1.1 which handles compression correctly.Changes
packages/clawdhub/src/http.ts: ChangedallowH2: true→allowH2: falseTesting
Context
The undici HTTP/2 implementation does not properly decompress response bodies when servers return compressed content over HTTP/2. This causes the CLI to receive binary data instead of valid JSON.
See: openclaw/openclaw#3637