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:
6550e8c
)
Update to use the new parseUri()
author
Urban Hafner
<urban@bettong.net>
Sun, 21 Jun 2009 14:28:58 +0000
(16:28 +0200)
committer
Urban Hafner
<urban@bettong.net>
Sun, 21 Jun 2009 14:28:58 +0000
(16:28 +0200)
src/http.js
patch
|
blob
|
history
diff --git
a/src/http.js
b/src/http.js
index
bef88bc
..
1bb126e
100644
(file)
--- a/
src/http.js
+++ b/
src/http.js
@@
-522,9
+522,7
@@
node.http.Client = function (port, host) {
node.http.cat = function(url, encoding, callback) {
var uri = node.http.parseUri(url)
- uri.port = uri.port == "" ? 80 : Number(uri.port)
- uri.path = uri.path == "" ? "/" : uri.path
- var req = new node.http.Client(uri.port, uri.host).get(uri.path)
+ var req = new node.http.Client(uri.port || 80, uri.host).get(uri.path || "/")
req.finish(function(res) {
var status = res.statusCode;
res.setBodyEncoding(encoding)