From 45f540244660aed31d26eba38f8eda43519528e0 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 29 Sep 2009 16:38:07 -0700 Subject: [PATCH] Pass the Host header in http.cat calls, if it was specified in the URL passed to http.cat. --- lib/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http.js b/lib/http.js index 0d7625c7497..097e8cefaba 100644 --- a/lib/http.js +++ b/lib/http.js @@ -555,7 +555,7 @@ exports.cat = function (url, encoding) { var uri = exports.parseUri(url); var client = exports.createClient(uri.port || 80, uri.host); - var req = client.get(uri.path || "/"); + var req = client.get(uri.path || "/", uri.host ? {"Host" : uri.host} : {}); client.addListener("error", function () { promise.emitError();