git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1cecfa1
)
Fixes crossDomain test so that it assumes port to be 80 for http and 443 for https...
author
jaubourg
<j@ubourg.net>
Wed, 19 Jan 2011 17:35:40 +0000
(18:35 +0100)
committer
jaubourg
<j@ubourg.net>
Wed, 19 Jan 2011 17:35:40 +0000
(18:35 +0100)
src/ajax.js
patch
|
blob
|
history
diff --git
a/src/ajax.js
b/src/ajax.js
index
e5fb5c4
..
be31fe3
100644
(file)
--- a/
src/ajax.js
+++ b/
src/ajax.js
@@
-317,6
+317,7
@@
jQuery.extend({
timeoutTimer,
// Cross-domain detection vars
loc = document.location,
timeoutTimer,
// Cross-domain detection vars
loc = document.location,
+ protocol = loc.protocol || "http:",
parts,
// The jXHR state
state = 0,
parts,
// The jXHR state
state = 0,
@@
-629,9
+630,10
@@
jQuery.extend({
parts = rurl.exec( s.url.toLowerCase() );
s.crossDomain = !!(
parts &&
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[ 2 ] != loc.hostname ||
- ( parts[ 3 ] || 80 ) != ( loc.port || 80 ) )
+ ( parts[ 3 ] || ( ( parts[ 1 ] || protocol ) === "http:" ? 80 : 443 ) )
+ != ( loc.port || ( protocol === "http:" ? 80 : 443 ) ) )
);
}
);
}