Skip to content

http2: set Http2Stream#sentHeaders for raw headers #59244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

RaisinTen
Copy link
Member

When #57917 added support for sending raw header arrays, Http2Stream#sentHeaders was set only for header objects. This change also sets it for raw headers by lazily instantiating the property to avoid any performance impact on the fast path.

When nodejs#57917 added support for sending
raw header arrays, Http2Stream#sentHeaders was set only for header
objects. This change also sets it for raw headers by lazily
instantiating the property to avoid any performance impact on the fast
path.

Signed-off-by: Darshan Sen <[email protected]>
@nodejs-github-bot nodejs-github-bot added http2 Issues or PRs related to the http2 subsystem. needs-ci PRs that need a full CI run. labels Jul 27, 2025
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/http2
  • @nodejs/net

@RaisinTen RaisinTen requested a review from pimterry July 27, 2025 14:39
Copy link

codecov bot commented Jul 27, 2025

Codecov Report

❌ Patch coverage is 95.12195% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.07%. Comparing base (3b57443) to head (1a75813).
⚠️ Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/http2/core.js 93.54% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #59244      +/-   ##
==========================================
+ Coverage   90.04%   90.07%   +0.03%     
==========================================
  Files         648      648              
  Lines      191078   191117      +39     
  Branches    37452    37462      +10     
==========================================
+ Hits       172050   172143      +93     
+ Misses      11649    11598      -51     
+ Partials     7379     7376       -3     
Files with missing lines Coverage Δ
lib/internal/http2/util.js 92.40% <100.00%> (+0.06%) ⬆️
lib/internal/http2/core.js 95.14% <93.54%> (-0.02%) ⬇️

... and 32 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.

Copy link
Member

@pimterry pimterry left a comment

Choose a reason for hiding this comment

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

Awesome, LGTM 👍

@pimterry pimterry added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 28, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 28, 2025
@nodejs-github-bot

This comment was marked as outdated.

@RaisinTen RaisinTen added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 29, 2025
@nodejs-github-bot
Copy link
Collaborator

Copy link
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

@RaisinTen RaisinTen added the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 29, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 29, 2025
@nodejs-github-bot nodejs-github-bot merged commit 751203d into nodejs:main Jul 29, 2025
73 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 751203d

@RaisinTen RaisinTen deleted the http2-set-Http2Stream-sentHeaders-for-raw-headers branch July 30, 2025 02:14
panva pushed a commit to panva/node that referenced this pull request Aug 1, 2025
When nodejs#57917 added support for sending
raw header arrays, Http2Stream#sentHeaders was set only for header
objects. This change also sets it for raw headers by lazily
instantiating the property to avoid any performance impact on the fast
path.

Signed-off-by: Darshan Sen <[email protected]>
PR-URL: nodejs#59244
Reviewed-By: Tim Perry <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
meteorqz6 pushed a commit to meteorqz6/node that referenced this pull request Aug 2, 2025
When nodejs#57917 added support for sending
raw header arrays, Http2Stream#sentHeaders was set only for header
objects. This change also sets it for raw headers by lazily
instantiating the property to avoid any performance impact on the fast
path.

Signed-off-by: Darshan Sen <[email protected]>
PR-URL: nodejs#59244
Reviewed-By: Tim Perry <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
targos pushed a commit that referenced this pull request Aug 8, 2025
When #57917 added support for sending
raw header arrays, Http2Stream#sentHeaders was set only for header
objects. This change also sets it for raw headers by lazily
instantiating the property to avoid any performance impact on the fast
path.

Signed-off-by: Darshan Sen <[email protected]>
PR-URL: #59244
Reviewed-By: Tim Perry <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. http2 Issues or PRs related to the http2 subsystem. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants