Fixes https host header default port handling.

This commit is contained in:
Mikeal Rogers 2011-08-07 16:14:32 -07:00 committed by isaacs
parent ef35f4d6c1
commit 24a1f6ecc5
2 changed files with 2 additions and 0 deletions

View File

@ -1259,6 +1259,7 @@ exports.request = function(options, cb) {
if (options.agent === undefined) {
options.agent = globalAgent;
}
options.defaultPort = options.defaultPort || 80;
return new ClientRequest(options, cb);
};

View File

@ -69,6 +69,7 @@ exports.request = function(options, cb) {
if (options.agent === undefined) {
options.agent = globalAgent;
}
options.defaultPort = options.defaultPort || 443;
return http.request(options, cb);
};