Skip to content

Require exact chunked final Transfer-Encoding coding - #2223

Merged
tappenzeller merged 1 commit into
masterfrom
normalize-transfer-encoding-parameters
Sep 25, 2026
Merged

tappenzeller merged 1 commit into
masterfrom
normalize-transfer-encoding-parameters

Conversation

@tappenzeller

@tappenzeller tappenzeller commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Http1FramingEnforcingHandler previously ignored transfer-coding parameters when checking the final item, so a value such as "chunked; mode=stream" was accepted as chunked.

RFC 9112 requires chunked to be the final transfer coding. Chunk extensions belong to the individual chunk syntax, not to the Transfer-Encoding header. This change therefore requires the final coding to be exactly chunked, compared case-insensitively after ordinary whitespace trimming. Parameters on earlier transfer codings remain supported, and accepted headers pass through unchanged.

Tests cover rejection of a parameterized final chunked coding and acceptance of a parameterized non-final coding followed by exact chunked.

@tappenzeller
tappenzeller force-pushed the normalize-transfer-encoding-parameters branch from 5465229 to c977c7c Compare September 25, 2026 15:31
@tappenzeller tappenzeller changed the title Normalize Transfer-Encoding parameters before forwarding Require exact chunked final Transfer-Encoding coding Sep 25, 2026
@tappenzeller
tappenzeller merged commit 3b7d682 into master Sep 25, 2026
4 checks 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