fix(client): ignore unsolicited 100 Continue responses #6242
All Vouch review confidence checks passed
Residual risk 0.10 = Change Risk (0.33) × (1 − Review Confidence (0.71)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 92 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.56 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.271
Real PR Conversation Timeline
3 items
Approved
Lgtm
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 91.74%. Comparing base (
5d7f657) to head (2343316).:warning: Report is 1 commits behind head on main.
<details><summary>Additional details and impacted files</summary>
@@ Coverage Diff @@
## main #6242 +/- ##
==========================================
- Coverage 91.74% 91.74% -0.01%
==========================================
Files 113 113
Lines 44849 44844 -5
==========================================
- Hits 41147 41141 -6
- Misses 3702 3703 +1
</details>
:umbrella: View full report in Codecov by Harness.
:loudspeaker: Have feedback on the report? Share it here.
<details><summary> :rocket: New features to boost your workflow: </summary>
</details>
mcollina
utsxvrai
This relates to...
Fixes #5899
Rationale
When an HTTP/1.1 server sends a
100 Continuethat the client never asked for (noExpect: 100-continue), undici destroys the socket withSocketError: bad response. RFC 9110 §15.2.1 lets a client discard such a response, browsers move on to the final response, and our README ("Expect" section) already says the 100 is ignored. This is the same idea as #5918, which was closed without review.Changes
Features
N/A
Bug Fixes
client-h1: drop the special case that treated a 100 status as a bad response. It now goes through the same path as other 1xx informational responses, and the final response plus connection reuse work as expected.test/http-100.js: theerror 100 bodytest asserted the old behaviour; replaced it withignore unsolicited 100 response.test/issue-5899.jscoveringClient(including keep-alive reuse) andfetch.Breaking Changes and Deprecations
N/A
Tests
node --test test/issue-5899.js test/http-100.js test/http2-informational.js: 8/8 pass (issue-5899 fails on main withbad response)node --test test/client.js test/http-.js test/issue-.js test/request.js test/pipeline*.js test/fetch/client-fetch.js: 501 tests, 0 failuresAI assistance: the code and tests were generated with a coding agent; I verified them by running the tests listed above and reviewing the diff.
Status
[cert]: https://github.com/nodejs/undici/blob/main/CONTRIBUTING.md#developers-certificate-of-origin