Permalink
Browse files

include port in HTTP request host header if port is not default (80)

  • Loading branch information...
1 parent 3f85098 commit 760a8de1e4ebe19fd5838196df781216665ea9ea @izuzak izuzak committed with Nov 20, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/websocket.js
View
2 lib/websocket.js
@@ -475,7 +475,7 @@ var WebSocket = function(url, proto, opts) {
var u = urllib.parse(url);
httpClient = http.createClient(u.port || 80, u.hostname);
httpPath = (u.pathname || '/') + (u.search || '');
- httpHeaders.Host = u.hostname;
+ httpHeaders.Host = u.hostname + (u.port ? (":" + u.port) : "");
break;
case 'ws+unix':

0 comments on commit 760a8de

Please sign in to comment.