]> source.dussan.org Git - jquery.git/commitdiff
Improved the robustness of the response codes based upon what's in Dojo. (Ticket...
authorJohn Resig <jeresig@gmail.com>
Sun, 18 Jun 2006 01:42:41 +0000 (01:42 +0000)
committerJohn Resig <jeresig@gmail.com>
Sun, 18 Jun 2006 01:42:41 +0000 (01:42 +0000)
ajax/ajax.js

index 8e0f81f5750d00232acab5465d97056a40c2be5a..b0a993cab58e98e8e66ac0b24ded148bf6a915a3 100644 (file)
@@ -63,7 +63,8 @@ $.xml = function( type, url, data, ret ) {
                                        $.xmlActive = 0
                                }
 
-                               if ( xml.status && xml.status >= 200 && xml.status < 300 ) {
+                               if ( ( xml.status && ( xml.status >= 200 && xml.status < 300 ) || xml.status == 304 ) ||
+                                       !xml.status && location.protocol == 'file:' ) {
                                        if ( onSuccess )
                                                onSuccess( xml );
                                } else if ( onError ) {