Fixes location mismatch error in Safari.

This commit is contained in:
Matt Robenolt
2011-11-03 01:35:18 -03:00
parent 946418e70e
commit 220f8d5bf5

View File

@@ -1,4 +1,3 @@
/*!
* socket.io-node
* Copyright(c) 2011 LearnBoost <dev@learnboost.com>
@@ -89,7 +88,7 @@ WebSocket.prototype.onSocketConnect = function () {
}
var origin = this.req.headers.origin
, location = (this.socket.encrypted ? 'wss' : 'ws')
, location = (origin.match(/^https/) ? 'wss' : 'ws')
+ '://' + this.req.headers.host + this.req.url
, waitingForNonce = false;