From ab40cc850652e325fcc3b0a44ee7303ae0a7b77f Mon Sep 17 00:00:00 2001 From: Mikeal Rogers Date: Fri, 21 May 2010 10:53:58 -0700 Subject: [PATCH] Preserve the original full path. --- lib/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/main.js b/lib/main.js index 0e106d66f..6651a030d 100644 --- a/lib/main.js +++ b/lib/main.js @@ -40,10 +40,10 @@ function request (options, callback) { if (options.uri.auth && !options.headers.authorization) { options.headers.authorization = "Basic " + base64.encode(options.uri.auth); } - options.pathname = options.uri.search ? (options.uri.pathname + options.uri.search) : options.uri.pathname; + options.fullpath = options.uri.href.replace(options.uri.href + '//' + options.uri.host); if (options.body) {options.headers['content-length'] = options.body.length} - options.request = options.client.request(options.method, options.pathname, options.headers); + options.request = options.client.request(options.method, options.fullpath, options.headers); options.request.addListener("response", function (response) { var buffer = '';