Avoid double ports in host header

Previously, it was possible that the host header looks
like domain.com:4444:4444 - obviously a bug.
This commit is contained in:
Rob Wu
2013-06-10 18:14:25 +02:00
parent 808e1761ef
commit 367b648114

View File

@@ -184,7 +184,7 @@ var getHandler = exports.getHandler = function(options) {
});
// Only add port if it was explicitly set
req.headers.host = host + (match[4] ? ':' + port : '');
req.headers.host = hostname + (match[4] ? ':' + port : '');
proxyRequest(req, res, proxy, full_url, {
host: hostname,