From 24a1f6ecc502ab67ca4aa33aa2af7e67747aad86 Mon Sep 17 00:00:00 2001 From: Mikeal Rogers Date: Sun, 7 Aug 2011 16:14:32 -0700 Subject: [PATCH] Fixes https host header default port handling. --- lib/http2.js | 1 + lib/https2.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/http2.js b/lib/http2.js index bc87442f64..36b81ec2c7 100644 --- a/lib/http2.js +++ b/lib/http2.js @@ -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); }; diff --git a/lib/https2.js b/lib/https2.js index c1c9b7109b..02f32897b6 100644 --- a/lib/https2.js +++ b/lib/https2.js @@ -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); };