mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
Removed unspecified trailing slash in proxy url
This commit is contained in:
parent
ec64e4f597
commit
eb97bf5423
@ -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;
|
||||
|
||||
//
|
||||
|
||||
@ -332,7 +332,7 @@ describe('lib/http-proxy/common.js', function () {
|
||||
{ path: '' }
|
||||
}, { url : '' });
|
||||
|
||||
expect(outgoing.path).to.be('/');
|
||||
expect(outgoing.path).to.be('');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user