Browse files

Fix bug in _proxyRequest in which the target port was disregarded

  • Loading branch information...
1 parent ead2635 commit d8984c841122c2db1b9ff6b1935bd4760ae9d534 @MaxNanasy committed Nov 15, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 openid.js
View
6 openid.js
@@ -183,10 +183,12 @@ var _proxyRequest = function(protocol, options)
if (! options.headers) options.headers = {};
+ var targetHostAndPort = targetHost + ':' + options.port;
+
options.host = proxyHostname;
options.port = proxyPort;
- options.path = protocol + '//' + targetHost + options.path;
- options.headers['Host'] = targetHost;
+ options.path = protocol + '//' + targetHostAndPort + options.path;
+ options.headers['Host'] = targetHostAndPort;
}
};
if ('https:' === protocol &&

0 comments on commit d8984c8

Please sign in to comment.