projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8c0211
)
Pass the Host header in http.cat calls, if it was specified in the URL passed to...
author
isaacs
<i@foohack.com>
Tue, 29 Sep 2009 23:38:07 +0000
(16:38 -0700)
committer
isaacs
<i@foohack.com>
Tue, 29 Sep 2009 23:38:07 +0000
(16:38 -0700)
lib/http.js
patch
|
blob
|
history
diff --git
a/lib/http.js
b/lib/http.js
index
0d7625c
..
097e8ce
100644
(file)
--- 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();