Skip to content

fix(curl): trim HTTP response header values#1675

Merged
jpnurmi merged 1 commit intomasterfrom
jpnurmi/fix/curl-trim-headers
Apr 28, 2026
Merged

fix(curl): trim HTTP response header values#1675
jpnurmi merged 1 commit intomasterfrom
jpnurmi/fix/curl-trim-headers

Conversation

@jpnurmi
Copy link
Copy Markdown
Collaborator

@jpnurmi jpnurmi commented Apr 27, 2026

Fixes the CURL transport to trim whitespace around response header values (other transports parse HTTP headers correctly).

For example, Retry-After: 60\r\n was stored as " 60\r\n". While this was harmless for existing numeric rate-limit headers because strtoll() ignores whitespace, it breaks string-valued headers. For example, TUS Location: Location: /foo/bar\r\n would be stored as " /foo/bar\r\n", which is not a valid location.

Extracted from:

#skip-changelog

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jpnurmi jpnurmi merged commit 74c1028 into master Apr 28, 2026
60 of 61 checks passed
@jpnurmi jpnurmi deleted the jpnurmi/fix/curl-trim-headers branch April 28, 2026 10:11
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.

3 participants