mirror of
https://github.com/adnexus/jquery.git
synced 2026-07-27 07:04:54 +00:00
Fixes crossDomain test so that it assumes port to be 80 for http and 443 for https when it is not provided.
This commit is contained in:
+4
-2
@@ -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 ) ) )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user