Skip to content

http: reject pipelined protocol switches - #66676

Open
mcollina wants to merge 1 commit into
nodejs:mainfrom
mcollina:fix-http-pipelined-upgrade-order
Open

mcollina wants to merge 1 commit into
nodejs:mainfrom
mcollina:fix-http-pipelined-upgrade-order

Conversation

@mcollina

Copy link
Copy Markdown
Member

Destroy the connection instead of emitting the upgrade or connect event when an earlier response is still pending. This prevents protocol-switch responses from being written ahead of earlier HTTP responses.

Document the behavior and cover both methods with regression tests.

—

AI gen, reviewed by me.

Destroy the connection instead of emitting the upgrade or connect event
when an earlier response is still pending. This prevents protocol-switch
responses from being written ahead of earlier HTTP responses.

Document the behavior and cover both methods with regression tests.

Assisted-by: Codex
Signed-off-by: Matteo Collina <[email protected]>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/http
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added http Issues and PRs related to the http subsystem. needs-ci PRs that need a full CI run. labels Oct 12, 2026
@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.47%. Comparing base (3b639be) to head (dac57a0).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66676      +/-   ##
==========================================
- Coverage   92.82%   90.47%   -2.35%     
==========================================
  Files         422      791     +369     
  Lines      194189   277095   +82906     
  Branches    30027    53278   +23251     
==========================================
+ Hits       180249   250696   +70447     
- Misses      13614    16810    +3196     
- Partials      326     9589    +9263     
Files with missing lines Coverage Δ
lib/_http_server.js 96.65% <100.00%> (+0.01%) ⬆️

... and 502 files with indirect coverage changes

🚀 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

http Issues and PRs related to the http subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants