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 08577de commit 7546030Copy full SHA for 7546030
lib/XMLHttpRequest.js
@@ -111,7 +111,7 @@ exports.XMLHttpRequest = function() {
111
this.responseXML = "";
112
this.status = null;
113
this.statusText = null;
114
-
+
115
// Whether cross-site Access-Control requests should be made using
116
// credentials such as cookies or authorization headers
117
this.withCredentials = false;
@@ -344,6 +344,9 @@ exports.XMLHttpRequest = function() {
344
// Set the Host header or the server may reject the request
345
headers.Host = host;
346
if (!((ssl && port === 443) || port === 80)) {
347
+ if (url.host[0] === '[') {
348
+ headers.Host = '[' + headers.Host + ']';
349
+ }
350
headers.Host += ":" + url.port;
351
}
352
0 commit comments