mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Ajax: Fix the XHR fallback logic for IE8
The logic for IE8 has been incorrectly reversed: every non-local request
outside of the whitelist was run via the native XHR. This commit reverses
this logic and adds back a fallback to the ActiveX XHR if the native one
fails even after the regex detection.
Refs 61f812b7e7
This commit is contained in:
parent
ef30bdf4f1
commit
bd699cb17b
@ -31,11 +31,8 @@ jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
|
||||
// and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9
|
||||
// Although this check for six methods instead of eight
|
||||
// since IE also does not support "trace" and "connect"
|
||||
if ( /^(get|post|head|put|delete|options)$/i.test( this.type ) ) {
|
||||
return createActiveXHR();
|
||||
}
|
||||
|
||||
return createStandardXHR();
|
||||
return /^(get|post|head|put|delete|options)$/i.test( this.type ) &&
|
||||
createStandardXHR() || createActiveXHR();
|
||||
} :
|
||||
// For all other browsers, use the standard XMLHttpRequest object
|
||||
createStandardXHR;
|
||||
|
Loading…
Reference in New Issue
Block a user