8000 Merge pull request #592 from SkeLLLa/patch-1 · digitalbazaar/node-http-proxy@c22610a · GitHub
[go: up one dir, main page]

Skip to content

Commit c22610a

Browse files
committed
Merge pull request http-party#592 from SkeLLLa/patch-1
Fix for http-party#591
2 parents
D67C
 1067054 + 99f7572 commit c22610a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/http-proxy/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ common.setupSocket = function(socket) {
7575
};
7676

7777
common.getPort = function(req) {
78-
var res = req.headers.host.match(/:(\d+)/);
78+
var res = req.headers.host ? req.headers.host.match(/:(\d+)/) : "";
7979
return res ?
8080
res[1] :
8181
req.connection.pair ? '443' : '80' ;

0 commit comments

Comments
 (0)
0