1
0
Fork 0

append port

This commit is contained in:
Jan Steemann 2014-02-21 10:05:40 +01:00
parent 2e03f01a25
commit 2c1743a732
1 changed files with 4 additions and 0 deletions

View File

@ -1479,6 +1479,10 @@ function handleRedirect (req, res, options, headers) {
if (req.headers.hasOwnProperty('host')) {
url += req.headers.host;
if (req.headers.host.indexOf(':') === -1) {
// append port number if not present in "host" header
url += ":" + req.server.port;
}
}
else {
url += req.server.address + ":" + req.server.port;