Bug in xdomain detection
the Socket.prototype._isXDomain function has a problem when the website is on the same domain, but different subdomain (which is still allowed for XHR). It will return that it is a cross-domain request but actually it should return false. I mean when you set document.domain manually so that you can communicate with iframe on different subdomain... Please fix. One dirty fix could be: return this.host.indexOf(document.domain) < 0; More proper would be to check if host ends with document.domain.
Example configuration for this problem: this.host = "abc.domain.com" document.domain = "domain.com"
Different subdomain is still cross domain
No it is not !,
Let's say that you have
you host = "domain.com" server = "ssever.domain.com"
If i understand correctly isXDomain should be only true if you cann't connect to "server" from your web page on "you host".
Please explain me why not if i'm wrong ?
Thanks !