diff options
author | Luigi Pinca <luigipinca@gmail.com> | 2019-07-07 07:59:44 +0200 |
---|---|---|
committer | Luigi Pinca <luigipinca@gmail.com> | 2019-07-10 16:22:18 +0200 |
commit | e800f9d68a3d949cd2bcea741638cfa8e42f3461 (patch) | |
tree | 2841e33be6000aef4a989ebf4a59cbc34739fc71 /lib/internal/http2 | |
parent | fe4d53df512edcd046f002b1b78c47a687f0fad1 (diff) | |
download | android-node-v8-e800f9d68a3d949cd2bcea741638cfa8e42f3461.tar.gz android-node-v8-e800f9d68a3d949cd2bcea741638cfa8e42f3461.tar.bz2 android-node-v8-e800f9d68a3d949cd2bcea741638cfa8e42f3461.zip |
http2: override authority with options
Make `options.host` and `options.port` take precedence over
`authority.host` and `authority.port` respectively.
PR-URL: https://github.com/nodejs/node/pull/28584
Fixes: https://github.com/nodejs/node/issues/28182
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'lib/internal/http2')
-rw-r--r-- | lib/internal/http2/core.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index a65dbb92c5..ec720da71e 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -2795,7 +2795,7 @@ function connect(authority, options, listener) { } else { switch (protocol) { case 'http:': - socket = net.connect(port, host); + socket = net.connect(options.port || port, options.host || host); break; case 'https:': socket = tls.connect(port, host, initializeTLSOptions(options, host)); |