Browse Source

Pass the Host header in http.cat calls, if it was specified in the URL passed to http.cat.

v0.7.4-release
isaacs 15 years ago
parent
commit
45f5402446
  1. 2
      lib/http.js

2
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();

Loading…
Cancel
Save