mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
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 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…
Reference in New Issue
Block a user