Skip to content

Commit d7e6065

Browse files
fix(http2): Use port 443 for HTTPS connections by default. (#7256)
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
1 parent 0bf4608 commit d7e6065

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/adapters/http.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ const buildAddressEntry = (address, family) => resolveFamily(utils.isObject(addr
268268

269269
const http2Transport = {
270270
request(options, cb) {
271-
const authority = options.protocol + '//' + options.hostname + ':' + (options.port || 80);
271+
const authority = options.protocol + '//' + options.hostname + ':' + (options.port ||(options.protocol === 'https:' ? 443 : 80));
272+
272273

273274
const {http2Options, headers} = options;
274275

0 commit comments

Comments
 (0)