Skip to content

fix(response): preserve body bytes and separate verbose exchanges - #35

Open
rupayon123 wants to merge 4 commits into
kavix:mainfrom
rupayon123:contribution/response-body-preservation-20260911
Open

rupayon123 wants to merge 4 commits into
kavix:mainfrom
rupayon123:contribution/response-body-preservation-20260911

Conversation

@rupayon123

@rupayon123 rupayon123 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Problem and change

Preserve raw response whitespace and CRLF, reject JSON/prose as invalid header names, and retain only the final exchange when parsing verbose redirects or interim responses. Recognize request-line structure so HTTP-like header values do not reset it. Preserve whitespace-only bodies through FromHTTPResponse and retain empty-body warnings only for genuinely empty content. Regression tests cover both parsing entry points, valid token header names, redirects and 103 Early Hints.

Validation

The new regression groups failed before their corresponding fixes. Full env -u NO_COLOR go test ./..., go vet ./..., formatting and diff checks pass. Remote build passes on 15a272ca81f6858622899c2cf8d8a0d8e5f1881e. golangci-lint is unavailable locally. Prepared with AI assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant