Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

ZYSzys
Copy link
Member

@ZYSzys ZYSzys commented Oct 2, 2019

Fixes: #29811

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the http2 Issues or PRs related to the http2 subsystem. label Oct 2, 2019
@trivikr
Copy link
Member

trivikr commented Oct 4, 2019

cc @nodejs/http2

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. 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 });
Copy link
Contributor

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?

Copy link
Member Author

@ZYSzys ZYSzys Oct 5, 2019

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.

@nodejs-github-bot
Copy link
Collaborator

@ZYSzys ZYSzys added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 7, 2019
@nodejs-github-bot
Copy link
Collaborator

ZYSzys added a commit that referenced this pull request Oct 7, 2019
PR-URL: #29816
Fixes: #29811
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
@ZYSzys
Copy link
Member Author

ZYSzys commented Oct 7, 2019

Landed in 95266db.

@ZYSzys ZYSzys closed this Oct 7, 2019
@cjihrig cjihrig mentioned this pull request Oct 7, 2019
3 tasks
BridgeAR pushed a commit that referenced this pull request Oct 9, 2019
PR-URL: #29816
Fixes: #29811
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
@BridgeAR BridgeAR mentioned this pull request Oct 10, 2019
@ZYSzys ZYSzys deleted the http2-connect branch October 20, 2019 06:07
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

http2.connect with url starting with "http://" does not pass options to net.connect
7 participants