Skip to content

fix(http1): accept unsolicited 100 responses - #5918

Open
GiHoon1123 wants to merge 1 commit into
nodejs:mainfrom
GiHoon1123:fix-http1-ignore-unsolicited-100
Open

GiHoon1123 wants to merge 1 commit into
nodejs:mainfrom
GiHoon1123:fix-http1-ignore-unsolicited-100

Conversation

@GiHoon1123

Copy link
Copy Markdown
Contributor

Fixes #5899

An unsolicited HTTP/1.1 100 Continue response should not terminate the connection. The client can ignore the interim response and continue parsing the final response.

The HTTP/1 parser was treating every 100 response as a bad response and destroying the socket. This change removes that special-case failure and keeps the existing informational-response handling.

The regression test covers:

  • 100 Continue followed by a final 200 response
  • response body delivery
  • reuse of the same connection for a subsequent request

Tests:

  • node --test test/http-100.js test/http2-informational.js
  • npm exec -- eslint lib/dispatcher/client-h1.js test/http-100.js

@codecov-commenter

codecov-commenter commented Sep 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.54%. Comparing base (e960331) to head (8987ebb).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5918   +/-   ##
=======================================
  Coverage   91.53%   91.54%           
=======================================
  Files         113      113           
  Lines       43597    43592    -5     
=======================================
- Hits        39908    39905    -3     
+ Misses       3689     3687    -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.

@koal44

koal44 commented Oct 8, 2026

Copy link
Copy Markdown

I reported #5899. I tested this against my existing transport tests and added checks for repeated 100 responses, pipelined requests, and connection reuse. Everything checked out.

The Node 22 CI failure looks like the issue addressed by #5961, so it may be worth rebasing and rerunning CI.

@GiHoon1123
GiHoon1123 force-pushed the fix-http1-ignore-unsolicited-100 branch from 25c156b to 8987ebb Compare October 9, 2026 12:52
@GiHoon1123

Copy link
Copy Markdown
Contributor Author

Thanks for testing those cases. I rebased on the current main after #5961, and the new CI run passed, including the Node 22 job that failed before.

This branch has not been deployed

No deployments
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.

Fetch should ignore unsolicited 100 Continue responses

3 participants