-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
http2: support passing options of http2.connect to net.connect #29816
Conversation
cc @nodejs/http2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We should probably update the docs as well.
@@ -2897,7 +2897,7 @@ function connect(authority, options, listener) { | |||
} else { | |||
switch (protocol) { | |||
case 'http:': | |||
socket = net.connect(options.port || port, options.host || host); | |||
socket = net.connect({ port, host, ...options }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intentional that options.host
and options.port
would now take precedence over those same fields in authority
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intentional that options.host and options.port would now take precedence over those same fields in authority
I think yes, however this behavior wasn't changed here but in #28584.
Landed in 95266db. |
Fixes: #29811
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes