http: reject responses exceeding header limit - #65010
Open
mcollina wants to merge 1 commit into
Open
Conversation
Previously, ClientRequest silently truncated responses that exceeded request.maxHeadersCount while llhttp continued using omitted headers. Reject these responses with HPE_HEADER_OVERFLOW so parser state and exposed headers cannot diverge. This is a semver-major behavior change. Signed-off-by: Matteo Collina <hello@matteocollina.com>
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65010 +/- ##
==========================================
- Coverage 90.27% 90.27% -0.01%
==========================================
Files 762 762
Lines 247515 247644 +129
Branches 46683 46697 +14
==========================================
+ Hits 223447 223552 +105
- Misses 15485 15528 +43
+ Partials 8583 8564 -19
🚀 New features to boost your workflow:
|
aduh95
reviewed
Aug 4, 2026
| if (parser_.type != HTTP_REQUEST) { | ||
| return 0; | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
@lpinca FYI since you mentioned those lines in the 26.6.0 proposal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, ClientRequest silently truncated responses that exceeded request.maxHeadersCount while llhttp continued using omitted headers.
Reject these responses with HPE_HEADER_OVERFLOW so parser state and exposed headers cannot diverge. This is a semver-major behavior change.