diff --git a/lib/http-proxy/common.js b/lib/http-proxy/common.js index 1d040d4..577f9b4 100644 --- a/lib/http-proxy/common.js +++ b/lib/http-proxy/common.js @@ -80,7 +80,7 @@ common.setupOutgoing = function(outgoing, options, req, forward) { // Remark: Can we somehow not use url.parse as a perf optimization? // var outgoingPath = !options.toProxy - ? (url.parse(req.url).path || '/') + ? (url.parse(req.url).path || '') : req.url; // diff --git a/test/lib-http-proxy-common-test.js b/test/lib-http-proxy-common-test.js index 4a1f0d3..1c5fe47 100644 --- a/test/lib-http-proxy-common-test.js +++ b/test/lib-http-proxy-common-test.js @@ -332,7 +332,7 @@ describe('lib/http-proxy/common.js', function () { { path: '' } }, { url : '' }); - expect(outgoing.path).to.be('/'); + expect(outgoing.path).to.be(''); }); });