Normalize multiple Transfer-Encoding headers before chunked detection#12465
Normalize multiple Transfer-Encoding headers before chunked detection#12465jmestwa-coder wants to merge 1 commit intoaio-libs:masterfrom
Conversation
2d5b4d4 to
1998286
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #12465 +/- ##
=======================================
Coverage 98.92% 98.92%
=======================================
Files 134 134
Lines 46750 46759 +9
Branches 2429 2429
=======================================
+ Hits 46248 46257 +9
Misses 373 373
Partials 129 129
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Merging this PR will not alter performance
Comparing Footnotes
|
Summary
Normalize multiple
Transfer-Encodingheaders into a single comma-separated value before chunked detection.Motivation
RFC 9110 §5.3 defines that multiple header fields are equivalent to a single comma-separated value. This makes the parser behavior explicit and consistent with the RFC.
Changes
headers.getall(...)forTransfer-EncodingTest
Add test covering split
Transfer-Encodingheaders (gzip+chunked) and verifying correct parsing of multiple responses.What do these changes do?
Normalize multiple
Transfer-Encodingheaders into a single comma-separated value before evaluating chunked encoding, in line with RFC 9110 §5.3.Are there changes in behavior for the user?
No.
This makes header handling explicit and consistent without changing observable behavior.
Is it a substantial burden for the maintainers to support this?
No.
The change is small, self-contained, and limited to parsing normalization. It does not introduce new APIs or complexity.
Related issue number
N/A
Checklist
CONTRIBUTORS.txtCHANGES/folder (.misc)