Skip to content

fix(h2): validate response content-length - #5816

Merged
mcollina merged 1 commit into
mainfrom
fix/h2-response-content-length
Sep 21, 2026
Merged

mcollina merged 1 commit into
mainfrom
fix/h2-response-content-length

Conversation

@mcollina

Copy link
Copy Markdown
Member

Validate response Content-Length against received DATA bytes in the HTTP/2 client. Truncated and oversized bodies now fail with the existing response length mismatch error while HEAD and 304 semantics are preserved. Includes fetch regression coverage for mismatches and session reuse.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
@codecov-commenter

codecov-commenter commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.32258% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.50%. Comparing base (fb3d786) to head (a5190f7).

Files with missing lines Patch % Lines
lib/dispatcher/client-h2.js 90.32% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5816      +/-   ##
==========================================
- Coverage   93.50%   93.50%   -0.01%     
==========================================
  Files         110      110              
  Lines       39557    39585      +28     
==========================================
+ Hits        36987    37013      +26     
- Misses       2570     2572       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcollina
mcollina merged commit bdfe59f into main Sep 21, 2026
37 of 38 checks passed
@mcollina
mcollina deleted the fix/h2-response-content-length branch September 21, 2026 19:59
@github-actions github-actions Bot mentioned this pull request Sep 21, 2026
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