From d7e60653460480ffacecf85383012ca1baa6263e Mon Sep 17 00:00:00 2001 From: Subhan Kumar Rai Date: Fri, 19 Dec 2025 05:52:38 +0530 Subject: [PATCH] fix(http2): Use port 443 for HTTPS connections by default. (#7256) Co-authored-by: Dmitriy Mozgovoy --- lib/adapters/http.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/adapters/http.js b/lib/adapters/http.js index dfa6386d..6a8a05dd 100755 --- a/lib/adapters/http.js +++ b/lib/adapters/http.js @@ -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;