Skip to content

fix: preserve connect option in H2CClient#5000

Merged
mcollina merged 1 commit intonodejs:mainfrom
trivikr:h2c-connect
Apr 8, 2026
Merged

fix: preserve connect option in H2CClient#5000
mcollina merged 1 commit intonodejs:mainfrom
trivikr:h2c-connect

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented Apr 8, 2026

This relates to...

Fixes: #4999

Rationale

H2CClient destructured connect out of clientOpts and then never forwarded it to Client. That caused custom connectors to be silently ignored, and invalid connect values were no longer rejected through Client's existing validation path.

Changes

Forward connect implicitly by leaving it inside ...opts when constructing Client.

Add a regression test covering custom connect usage in H2CClient.

Features

N/A

Bug Fixes

Restore support for the connect option in H2CClient.

Breaking Changes and Deprecations

N/A

Status

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.92%. Comparing base (743aa89) to head (a4ed737).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5000   +/-   ##
=======================================
  Coverage   92.92%   92.92%           
=======================================
  Files         110      110           
  Lines       35729    35729           
=======================================
  Hits        33201    33201           
  Misses       2528     2528           

☔ 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 5334fa6 into nodejs:main Apr 8, 2026
35 checks passed
@trivikr trivikr deleted the h2c-connect branch April 8, 2026 15:58
@github-actions github-actions bot mentioned this pull request Apr 12, 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.

H2CClient ignores the connect option

3 participants