Skip to content

Commit

Permalink
Merge pull request socketio#353 from dget/master
Browse files Browse the repository at this point in the history
Fix connections between http/https in IE
  • Loading branch information
rauchg committed Dec 21, 2011
2 parents 13a8796 + 0ba168c commit 201a0eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/transports/xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@

XHR.check = function (socket, xdomain) {
try {
if (io.util.request(xdomain)) {
var request = io.util.request(xdomain);
var socket_protocol = socket.options.secure ? 'https' : http;
var global_protocol = global.location.protocol.split(':')[0];
if (request && !(global.XDomainRequest && request instanceof XDomainRequest && socket_protocol != global_protocol) ) {
return true;
}
} catch(e) {}
Expand Down

0 comments on commit 201a0eb

Please sign in to comment.