websocket default port to 80 not 443

This commit is contained in:
Andrew Kelley 2014-03-03 17:35:33 -05:00
parent bc6ecfb65d
commit 5c8e0fcf9e

View file

@ -14,7 +14,7 @@ function Socket() {
var host = window.document.location.host;
var pathname = window.document.location.pathname;
var match = host.match(/^(.+):(\d+)$/);
var port = match ? parseInt(match[2], 10) : 443;
var port = match ? parseInt(match[2], 10) : 80;
var hostName = match ? match[1] : host;
var wsUrl = 'ws://' + hostName + ':' + port + pathname;
self.ws = new WebSocket(wsUrl);