From c192a1b5df977a412a6e7d49c0d0550dc58858f2 Mon Sep 17 00:00:00 2001 From: Urban Hafner Date: Sun, 21 Jun 2009 16:28:58 +0200 Subject: [PATCH] Update to use the new parseUri() --- src/http.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/http.js b/src/http.js index bef88bcbe3a..1bb126e67c5 100644 --- 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)