Merge pull request #592 from SkeLLLa/patch-1

Fix for #591
This commit is contained in:
Jarrett Cruger 2014-03-11 18:03:12 -04:00
commit c22610af75

View File

@ -75,7 +75,7 @@ common.setupSocket = function(socket) {
};
common.getPort = function(req) {
var res = req.headers.host.match(/:(\d+)/);
var res = req.headers.host ? req.headers.host.match(/:(\d+)/) : "";
return res ?
res[1] :
req.connection.pair ? '443' : '80' ;