Skip to content

Commit

Permalink
Preserve the original full path.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeal committed May 21, 2010
1 parent 49dfef4 commit ab40cc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down

0 comments on commit ab40cc8

Please sign in to comment.