Removed unspecified trailing slash in proxy url

This commit is contained in:
donasaur 2015-10-18 13:04:06 -07:00
parent ec64e4f597
commit eb97bf5423
2 changed files with 2 additions and 2 deletions

View File

@ -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;
//

View File

@ -332,7 +332,7 @@ describe('lib/http-proxy/common.js', function () {
{ path: '' }
}, { url : '' });
expect(outgoing.path).to.be('/');
expect(outgoing.path).to.be('');
});
});