Browse Source

Update to use the new parseUri()

v0.7.4-release
Urban Hafner 16 years ago
parent
commit
c192a1b5df
  1. 4
      src/http.js

4
src/http.js

@ -522,9 +522,7 @@ node.http.Client = function (port, host) {
node.http.cat = function(url, encoding, callback) { node.http.cat = function(url, encoding, callback) {
var uri = node.http.parseUri(url) var uri = node.http.parseUri(url)
uri.port = uri.port == "" ? 80 : Number(uri.port) var req = new node.http.Client(uri.port || 80, uri.host).get(uri.path || "/")
uri.path = uri.path == "" ? "/" : uri.path
var req = new node.http.Client(uri.port, uri.host).get(uri.path)
req.finish(function(res) { req.finish(function(res) {
var status = res.statusCode; var status = res.statusCode;
res.setBodyEncoding(encoding) res.setBodyEncoding(encoding)

Loading…
Cancel
Save