Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 501fa01d04ccbb80b73e42ecfe13bb48d0d9af4a 1 parent bf4f9d7
@izuzak izuzak authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/websocket.js
View
2  lib/websocket.js
@@ -441,7 +441,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':
Please sign in to comment.
Something went wrong with that request. Please try again.