Skip to content

Conversation

@RaisinTen
Copy link
Member

These would allow inspection of HTTP/2 client stream request bodies.

These would allow inspection of HTTP/2 client stream request bodies.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/http2
  • @nodejs/net

@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 Oct 29, 2025
@nodejs-github-bot

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 86.11111% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.56%. Comparing base (ba7cdf4) to head (939ecff).
⚠️ Report is 30 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/http2/core.js 86.11% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60480      +/-   ##
==========================================
- Coverage   88.56%   88.56%   -0.01%     
==========================================
  Files         704      704              
  Lines      207774   207864      +90     
  Branches    40027    40047      +20     
==========================================
+ Hits       184020   184090      +70     
- Misses      15800    15815      +15     
- Partials     7954     7959       +5     
Files with missing lines Coverage Δ
lib/internal/http2/core.js 95.12% <86.11%> (-0.09%) ⬇️

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

@nodejs-github-bot
Copy link
Collaborator

Comment on lines +2323 to +2327
chunk = Buffer.concat(buffers);
} else if (typeof data === 'string') {
chunk = Buffer.from(data);
} else {
chunk = data;
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn’t it better to preserve the original chunk type (string, Buffer, TypedArray) instead of always converting it to a Buffer? This avoids extra allocation and encoding costs, and defers type conversion to the subscriber.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants