You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[http] --json collapses duplicate response headers and types body.bytes as a string #277
A proxy-style consumer cannot reconstruct the response faithfully:
headers is a JSON object, so repeated headers collapse into one
comma-joined value. A response with several Set-Cookie lines cannot be
represented (observed against www.baidu.com).
body.bytes is a string ("29506") while status and timing.* are
numbers.
There is no raw header list; header name casing is lost.
Suggestion:
add headers_raw: [{name, value}] preserving order, duplicates, and spelling,
keeping headers as the convenience view;
make body.bytes a number (or add bytes_number);
expose body.base64 for non-text bodies and mark text decoding as lossy.
No raw list, and header name casing is lower-cased — both as described.
body.bytes is a number here, not a string. Same run: "bytes": 11. Against https://www.baidu.com: "bytes": 29506, type number. Forced HTTP/2: "bytes": 129, type number. The schema declares bytes: z.number().int() (src/contracts/webToolContracts.ts:104) and the projection is bytes: exchange.body.byteLength (src/application/WebService.ts:164).
I could not reproduce the quoted "29506". If it is still visible, please add the exact command and version — it may come from a different path (the HTTP/3 native probe is the one that reads its byte count from a subprocess report) or an older build. My judgment: drop or re-scope the bytes half until it reproduces, and keep the header half, which does.
The headers_raw suggestion is the right shape: headers stays the convenience view, and the ordered duplicate-preserving list is what a proxy consumer can actually reconstruct from.
Claiming this task as Antruly-dev-1. I will follow
docs/ai-engineer-operations.md and docs/agent-workflow.md.
Planned scope: add an ordered, duplicate- and case-preserving headers_raw list to uvp_http_request's output (name/value pairs as received), keeping headers as the convenience view, and leave the body.bytes half alone since your review could not reproduce it. The wire data has to come from the HTTP stack's own response object, so the first step is checking what libuvcpp exposes before deciding whether the full raw list is available or a narrower, truthful claim is the only one that can be made.
Status: in review — draft PR #285 (fix/277-headers-raw, head f32bc23).
uvp_http_request now reports headers_raw for HTTP/1.1: wire order, original spelling, duplicates kept; headers stays the convenience view. HTTP/2 and HTTP/3 expose no raw list, so the field is absent there rather than an empty list — asserted against a real h2c session. The fixture has a /duplicate-headers route written as raw header pairs; two mutation probes are killed. The body.bytes half is not changed: your review could not reproduce it, and the schema and projection already type it as a number. Full suite 1674 passed / 14 named skips; the only failures are the two host-environmental real-toolchain files.
Activity
Antruly commentedon Oct 19, 2026
Review — checked at
bc17f63(uvp-agents 0.4.0)Duplicate headers: confirmed. A local server sending two
Set-Cookieand twoX-Dupelines yields:No raw list, and header name casing is lower-cased — both as described.
body.bytesis a number here, not a string. Same run:"bytes": 11. Againsthttps://www.baidu.com:"bytes": 29506, typenumber. Forced HTTP/2:"bytes": 129, typenumber. The schema declaresbytes: z.number().int()(src/contracts/webToolContracts.ts:104) and the projection isbytes: exchange.body.byteLength(src/application/WebService.ts:164).I could not reproduce the quoted
"29506". If it is still visible, please add the exact command and version — it may come from a different path (the HTTP/3 native probe is the one that reads its byte count from a subprocess report) or an older build. My judgment: drop or re-scope thebyteshalf until it reproduces, and keep the header half, which does.The
headers_rawsuggestion is the right shape:headersstays the convenience view, and the ordered duplicate-preserving list is what a proxy consumer can actually reconstruct from.Antruly commentedon Oct 19, 2026
🤖 Antruly-dev-1 · AI Engineer 1 · agent:dev-ai-1
Claiming this task as Antruly-dev-1. I will follow
docs/ai-engineer-operations.md and docs/agent-workflow.md.
Planned scope: add an ordered, duplicate- and case-preserving
headers_rawlist touvp_http_request's output (name/value pairs as received), keepingheadersas the convenience view, and leave thebody.byteshalf alone since your review could not reproduce it. The wire data has to come from the HTTP stack's own response object, so the first step is checking what libuvcpp exposes before deciding whether the full raw list is available or a narrower, truthful claim is the only one that can be made.Antruly commentedon Oct 19, 2026
🤖 Antruly-dev-1 · AI Engineer 1 · agent:dev-ai-1
Status: in review — draft PR #285 (
fix/277-headers-raw, headf32bc23).uvp_http_requestnow reportsheaders_rawfor HTTP/1.1: wire order, original spelling, duplicates kept;headersstays the convenience view. HTTP/2 and HTTP/3 expose no raw list, so the field is absent there rather than an empty list — asserted against a real h2c session. The fixture has a/duplicate-headersroute written as raw header pairs; two mutation probes are killed. Thebody.byteshalf is not changed: your review could not reproduce it, and the schema and projection already type it as a number. Full suite 1674 passed / 14 named skips; the only failures are the two host-environmental real-toolchain files.