X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fajax.js;h=cbe55727072168c245644dd429a2c24b6fe9a8de;hb=44f3a1b405e158615d9f2fca3238ccb12f9fa895;hp=e5fb5c4bcc123236db88acf62df2424e4e21a0e3;hpb=1cecfa1ece0d48b253fb0775bba645c464e363a4;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index e5fb5c4..cbe5572 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -317,6 +317,7 @@ jQuery.extend({ timeoutTimer, // Cross-domain detection vars loc = document.location, + protocol = loc.protocol || "http:", parts, // The jXHR state state = 0, @@ -629,9 +630,10 @@ jQuery.extend({ parts = rurl.exec( s.url.toLowerCase() ); s.crossDomain = !!( parts && - ( parts[ 1 ] && parts[ 1 ] != loc.protocol || + ( parts[ 1 ] && parts[ 1 ] != protocol || parts[ 2 ] != loc.hostname || - ( parts[ 3 ] || 80 ) != ( loc.port || 80 ) ) + ( parts[ 3 ] || ( ( parts[ 1 ] || protocol ) === "http:" ? 80 : 443 ) ) != + ( loc.port || ( protocol === "http:" ? 80 : 443 ) ) ) ); }