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 8e0f81f..b0a993c 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 ) {