We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f495cb6 commit 4784e64Copy full SHA for 4784e64
lib/internal/url.js
@@ -1170,9 +1170,9 @@ function urlToHttpOptions(url) {
1170
__proto__: null,
1171
...url, // In case the url object was extended by the user.
1172
protocol: url.protocol,
1173
- hostname: url.hostname && StringPrototypeStartsWith(url.hostname, '[') ?
1174
- StringPrototypeSlice(url.hostname, 1, -1) :
1175
- url.hostname,
+ hostname: hostname && StringPrototypeStartsWith(hostname, '[') ?
+ StringPrototypeSlice(hostname, 1, -1) :
+ hostname,
1176
hash: url.hash,
1177
search: search,
1178
pathname: pathname,
0 commit comments