Skip to content

fix: reset invalid HTTP/2 sessions#5310

Open
mcollina wants to merge 1 commit into
mainfrom
fix/h2-invalid-session-reset
Open

fix: reset invalid HTTP/2 sessions#5310
mcollina wants to merge 1 commit into
mainfrom
fix/h2-invalid-session-reset

Conversation

@mcollina
Copy link
Copy Markdown
Member

@mcollina mcollina commented May 18, 2026

Summary

  • reset cached HTTP/2 client session/context/socket state when session.request() throws ERR_HTTP2_INVALID_SESSION
  • requeue the unsent request locally in the HTTP/2 client so it can be sent on a fresh session
  • add regression coverage for invalid sessions and server-truncated HTTP/2 sessions

Tests

  • npx borp -p "test/http2-invalid-session.js"
  • npx borp -p "test/http2-invalid-connection-headers.js"
  • npx borp -p "test/http2-*.js"
  • npm run lint -- test/http2-invalid-session.js lib/dispatcher/client-h2.js

@mcollina mcollina force-pushed the fix/h2-invalid-session-reset branch from f06dad1 to 8372e6f Compare May 18, 2026 13:04
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.23%. Comparing base (d863782) to head (52c64f0).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5310   +/-   ##
=======================================
  Coverage   93.22%   93.23%           
=======================================
  Files         110      110           
  Lines       36603    36668   +65     
=======================================
+ Hits        34123    34187   +64     
- Misses       2480     2481    +1     

☔ View full report in Codecov by Sentry.
📢 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 force-pushed the fix/h2-invalid-session-reset branch from 8372e6f to 209d424 Compare May 18, 2026 13:30
@mcollina mcollina requested a review from trivikr May 18, 2026 14:24
Comment thread test/http2-invalid-session.js Outdated
Comment thread test/http2-invalid-session.js
@mcollina mcollina force-pushed the fix/h2-invalid-session-reset branch 2 times, most recently from 939084a to 384612e Compare May 18, 2026 16:22
@metcoder95
Copy link
Copy Markdown
Member

lint seems unhappy

@mcollina mcollina force-pushed the fix/h2-invalid-session-reset branch from 9cb1a59 to 96a2d1b Compare May 29, 2026 08:14
@mcollina mcollina force-pushed the fix/h2-invalid-session-reset branch from 96a2d1b to 52c64f0 Compare May 29, 2026 15:38
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.

4 participants