← Back to Pull requests

fix(fetch): close the connection when a null body status response has content #6218

Merged
mcollina merged 2 files (97 lines) on Nov 17, 2026 15:57 UTC
View on GitHub
mcollina mcollina commented on Nov 17, 2026 08:59 UTC
Author

A 205 (Reset Content) response must not carry content, but HTTP/1.1 framing still allows one (RFC 9112 §6.3 only makes HEAD, 1xx, 204 and 304 responses end at the headers), so llhttp correctly parses a body when the server sends Transfer-Encoding: chunked or a non-zero Content-Length. Fetch exposes these responses with a null body and silently drained the content, so a server that never finished the body kept the connection busy until bodyTimeout, and the caller had no body stream to cancel.

When content arrives on a null-body-status response, fetch now aborts the dispatch, which closes the connection, and ignores the resulting error because the response has already been delivered without a body. A 205 without content keeps reusing the connection.

Diff: 97 lines (+96 / -1) across 2 files Reviewer: ronag Review duration: 417m
All Vouch review confidence checks passed
Residual risk 0.09 = Change Risk (0.32) × (1 − Review Confidence (0.71)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.32 · 97 lines diff across 2 files
0.32
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.56 · 1 substantive comment(s)
0.56
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
70%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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.274
Real PR Conversation Timeline
3 items
ronag ronag approved these changes on Nov 17, 2026 09:13 UTC
Approved Reviewer

Approved these changes.

codecov-commenter codecov-commenter commented on Nov 17, 2026 09:23 UTC
Contributor

Codecov Report


:x: Patch coverage is 90.00000% with 2 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 91.68%. Comparing base (046bb4c) to head (14749c5).
:warning: Report is 52 commits behind head on main.

| Files with missing lines | Patch % | Lines |
|---|---|---|
| lib/web/fetch/index.js | 90.00% | 2 Missing :warning: |

<details><summary>Additional details and impacted files</summary>

@@            Coverage Diff             @@
##             main    #6218      +/-   ##
==========================================
+ Coverage   91.61%   91.68%   +0.06%     
==========================================
  Files         113      113              
  Lines       44044    44481     +437     
==========================================
+ Hits        40351    40781     +430     
- Misses       3693     3700       +7     

</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>

  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

  • </details>

    Reviewers
    Assignees
    mcollina mcollina
    Labels
    risk: low confidence: 70.9% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 31.9% (LOW) · Higher = larger blast radius
    31.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 70.9% · Lower = rushed or shallow review
    70.9%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 9.3% · Safe to merge
    9.3%
    Repository