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 1c778b3 commit 69a689bCopy full SHA for 69a689b
lib/XMLHttpRequest.js
@@ -310,7 +310,10 @@ exports.XMLHttpRequest = function() {
310
var uri = url.pathname + (url.search ? url.search : '');
311
312
// Set the Host header or the server may reject the request
313
- headers["Host"] = host + ':' + url.port;
+ headers["Host"] = host;
314
+ if (!((ssl && port === 443) || port === 80)) {
315
+ headers["Host"] += ':' + url.port;
316
+ }
317
318
// Set Basic Auth if necessary
319
if (settings.user) {
0 commit comments