Pass the Host header in http.cat calls, if it was specified in the URL passed to http.cat.
This commit is contained in:
parent
a8c0211e73
commit
45f5402446
@ -555,7 +555,7 @@ exports.cat = function (url, encoding) {
|
|||||||
|
|
||||||
var uri = exports.parseUri(url);
|
var uri = exports.parseUri(url);
|
||||||
var client = exports.createClient(uri.port || 80, uri.host);
|
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 () {
|
client.addListener("error", function () {
|
||||||
promise.emitError();
|
promise.emitError();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user