Skip to content

http2: support passing options of http2.connect to net.connect - #29816

Closed
ZYSzys wants to merge 1 commit into
nodejs:masterfrom
zys-contrib:http2-connect
Closed

http2: support passing options of http2.connect to net.connect#29816
ZYSzys wants to merge 1 commit into
nodejs:masterfrom
zys-contrib:http2-connect

Conversation

@ZYSzys

Copy link
Copy Markdown
Member

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-botnodejs-github-bot added the http2 Issues or PRs related to the http2 subsystem. label Oct 2, 2019
@trivikr

Copy link
Copy Markdown
Member

cc @nodejs/http2

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

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.

switch (protocol) {
case 'http:':
socket = net.connect(options.port || port, options.host || host);
socket = net.connect({ port, host, ...options });

Copy link
Copy Markdown
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?

@ZYSzysZYSzysOct 5, 2019

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
Collaborator

@ZYSzysZYSzys 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
Copy Markdown
Collaborator

ZYSzys added a commit that referenced this pull request Oct 7, 2019
PR-URL: #29816Fixes: #29811
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
@ZYSzys

Copy link
Copy Markdown
MemberAuthor

Landed in 95266db.

@ZYSzysZYSzys closed this Oct 7, 2019
@cjihrigcjihrig mentioned this pull request Oct 7, 2019
3 tasks
BridgeAR pushed a commit that referenced this pull request Oct 9, 2019
PR-URL: #29816Fixes: #29811
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
@BridgeARBridgeAR mentioned this pull request Oct 10, 2019
@ZYSzys
ZYSzys deleted the http2-connect branch October 20, 2019 06:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.http2Issues 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

@ZYSzys@trivikr@nodejs-github-bot@mcollina@jasnell@cjihrig@gengjiawen