Skip to content

refactor(h1): track HEAD keep-alive override as boolean#5110

Merged
mcollina merged 1 commit intonodejs:mainfrom
trivikr:header-connection
Apr 25, 2026
Merged

refactor(h1): track HEAD keep-alive override as boolean#5110
mcollina merged 1 commit intonodejs:mainfrom
trivikr:header-connection

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented Apr 25, 2026

This relates to...

HEAD response keep-alive handling in client-h1

Rationale

The HEAD-specific keep-alive override was depending on 1this.connection.toLowerCase()` at headers-complete time. This change replaces that with an explicit tracked boolean so the parser carries only the state needed for the override and avoids string-based re-checks.

Changes

  • Track Connection: keep-alive as a boolean on the H1 parser
  • Use that boolean in the HEAD keep-alive override path
  • Reset the tracked state between responses

Features

N/A

Bug Fixes

N/A

Breaking Changes and Deprecations

N/A

Status

Assisted-by: openai:gpt-5.4

Assisted-by: openai:gpt-5.4
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
@trivikr trivikr changed the title refactor(client-h1): track HEAD keep-alive override as boolean refactor(h1): track HEAD keep-alive override as boolean Apr 25, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.14%. Comparing base (94c9dea) to head (9f06cd5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5110   +/-   ##
=======================================
  Coverage   93.14%   93.14%           
=======================================
  Files         110      110           
  Lines       35894    35896    +2     
=======================================
+ Hits        33432    33434    +2     
  Misses       2462     2462           

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

Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 5c96f7d into nodejs:main Apr 25, 2026
34 of 35 checks passed
@trivikr trivikr deleted the header-connection branch April 25, 2026 17:12
@github-actions github-actions Bot mentioned this pull request May 1, 2026
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.

3 participants