Skip to content

http2: expose writable stream state on compat response#63003

Open
cookesan wants to merge 1 commit intonodejs:mainfrom
cookesan:fix-http2-writable-properties
Open

http2: expose writable stream state on compat response#63003
cookesan wants to merge 1 commit intonodejs:mainfrom
cookesan:fix-http2-writable-properties

Conversation

@cookesan
Copy link
Copy Markdown

Fixes: #63000

This adds the missing writableObjectMode and writableNeedDrain getters to Http2ServerResponse in the HTTP/2 compatibility layer. The getters mirror the underlying stream, matching the existing writable state properties.

The writable-properties test now covers both properties.

Tests:

  • ./configure --ninja
  • ninja -C out/Release node
  • git diff --check
  • ./out/Release/node --check lib/internal/http2/compat.js
  • ./out/Release/node --check test/parallel/test-http2-res-writable-properties.js
  • python3 tools/test.py --mode=release test/parallel/test-http2-res-writable-properties.js
  • python3 tools/test.py --mode=release test/parallel/test-http2-res-writable-properties.js test/parallel/test-http2-compat-serverresponse.js test/parallel/test-http2-compat-serverresponse-finished.js test/parallel/test-http2-compat-serverresponse-drain.js
  • make lint-js LINT_JS_TARGETS="lib/internal/http2/compat.js test/parallel/test-http2-res-writable-properties.js"

@nodejs-github-bot
Copy link
Copy Markdown
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 Apr 28, 2026
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 added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 28, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 28, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.67%. Comparing base (4e3a873) to head (ab628ad).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #63003      +/-   ##
==========================================
- Coverage   91.47%   89.67%   -1.81%     
==========================================
  Files         357      707     +350     
  Lines      150883   219517   +68634     
  Branches    23778    42089   +18311     
==========================================
+ Hits       138026   196842   +58816     
- Misses      12582    14579    +1997     
- Partials      275     8096    +7821     
Files with missing lines Coverage Δ
lib/internal/http2/compat.js 96.96% <100.00%> (+0.02%) ⬆️

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

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.

http2: Http2ServerResponse missing writableObjectMode and writableNeedDrain

3 participants