fix(http2): Use port 443 for HTTPS connections by default. (#7256)

Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
This commit is contained in:
Subhan Kumar Rai 2025-12-19 05:52:38 +05:30 committed by GitHub
parent 0bf4608d60
commit d7e6065346
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -268,7 +268,8 @@ const buildAddressEntry = (address, family) => resolveFamily(utils.isObject(addr
const http2Transport = {
request(options, cb) {
const authority = options.protocol + '//' + options.hostname + ':' + (options.port || 80);
const authority = options.protocol + '//' + options.hostname + ':' + (options.port ||(options.protocol === 'https:' ? 443 : 80));
const {http2Options, headers} = options;