Skip to content

Keep the caller's name for Content-Length and Transfer-Encoding - #36

Merged
bogdanfinn merged 1 commit into
bogdanfinn:masterfrom
pagpeter:caller-request-headers
Oct 26, 2026
Merged

bogdanfinn merged 1 commit into
bogdanfinn:masterfrom
pagpeter:caller-request-headers

Conversation

@pagpeter

Copy link
Copy Markdown

The HTTP/1 request writer replaces a caller's Content-Length, Transfer-Encoding or Trailer under any case with the value from the request, written under the canonical name (#32). A request whose headers are all lower case, as Node's fetch writes them, therefore goes out with "Content-Length" among lower-case headers, which changes how the request looks.

Keep #32's single header and computed values, but write them under the name the caller used. If the caller used more than one spelling, or none, the name is canonical, as before.

The HTTP/1 request writer replaces a caller's Content-Length,
Transfer-Encoding or Trailer under any case with the value from the request,
written under the canonical name (bogdanfinn#32). A request whose headers are all lower
case, as Node's fetch writes them, therefore goes out with "Content-Length"
among lower-case headers, which changes how the request looks.

Keep bogdanfinn#32's single header and computed values, but write them under the name
the caller used. If the caller used more than one spelling, or none, the
name is canonical, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bogdanfinn
bogdanfinn merged commit 1b5d1d4 into bogdanfinn:master Oct 26, 2026
1 check passed
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.

2 participants