Fixed xDomain detection (fixes #462 from socket.io).

This commit is contained in:
Guillermo Rauch
2011-09-03 14:30:52 -07:00
parent 27ed6ca98a
commit 43f9d29c41

View File

@@ -342,8 +342,10 @@
return false;
// end node
var locPort = window.location.port || 80;
return this.options.host !== document.domain || this.options.port != locPort;
var port = window.location.port ||
('https:' == window.location.protocol ? 443 : 80);
return this.options.host !== document.domain || this.options.port != port;
};
/**