Skip to content

Commit 6b65c42

Browse files
committed
Merge pull request #893 from donasaur/master
Removed unspecified trailing slash in proxy url
2 parents ec64e4f + eb97bf5 commit 6b65c42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/http-proxy/common.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ common.setupOutgoing = function(outgoing, options, req, forward) {
8080
// Remark: Can we somehow not use url.parse as a perf optimization?
8181
//
8282
var outgoingPath = !options.toProxy
83-
? (url.parse(req.url).path || '/')
83+
? (url.parse(req.url).path || '')
8484
: req.url;
8585

8686
//

test/lib-http-proxy-common-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ describe('lib/http-proxy/common.js', function () {
332332
{ path: '' }
333333
}, { url : '' });
334334

335-
expect(outgoing.path).to.be('/');
335+
expect(outgoing.path).to.be('');
336336
});
337337

338338
});

0 commit comments

Comments
 (0)