aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-02-03 18:22:37 +0100
committerjaubourg <j@ubourg.net>2011-02-03 18:22:37 +0100
commit4d808a3345f78fab963be96bf272951745b894e3 (patch)
tree16fb72c28766c60200cc9c9c61c1c345695f02f5 /src/ajax
parent0736db64a21d961263161c2392dc6a0161bd4e86 (diff)
downloadjquery-4d808a3345f78fab963be96bf272951745b894e3.tar.gz
jquery-4d808a3345f78fab963be96bf272951745b894e3.zip
Don't use a local copy of jQuery.ajaxSettings.isLocal anymore but use the current value so that it is possible to set isLocal to true for protocols unknown to jQuery.
Diffstat (limited to 'src/ajax')
-rw-r--r--src/ajax/xhr.js17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js
index 97db07951..91a71de8d 100644
--- a/src/ajax/xhr.js
+++ b/src/ajax/xhr.js
@@ -23,11 +23,7 @@ var // Next active xhr id
xhrUnloadAbortInstalled,
// XHR used to determine supports properties
- testXHR,
-
- // Keep track of isLocal in case it gets removed
- // from ajaxSettings later on
- protocolIsLocal = jQuery.ajaxSettings.isLocal;
+ testXHR;
// Create the request object
// (This is still attached to ajaxSettings for backward compatibility)
@@ -38,12 +34,9 @@ jQuery.ajaxSettings.xhr = window.ActiveXObject ?
* Additionally XMLHttpRequest can be disabled in IE7/IE8 so
* we need a fallback.
*/
- ( protocolIsLocal ?
- createActiveXHR :
- function() {
- return createStandardXHR() || createActiveXHR();
- }
- ) :
+ function() {
+ return !this.isLocal && createStandardXHR() || createActiveXHR();
+ } :
// For all other browsers, use the standard XMLHttpRequest object
createStandardXHR;
@@ -196,7 +189,7 @@ if ( jQuery.support.ajax ) {
status = 302;
}
// All same-domain: for local files, 0 is a success
- } else if( protocolIsLocal ) {
+ } else if( s.isLocal ) {
status = 200;
// Opera: this notifies success for all requests
// (verified in 11.01). Patch welcome.