Improved the robustness of the response codes based upon what's in Dojo. (Ticket #14)

This commit is contained in:
John Resig 2006-06-18 01:42:41 +00:00
parent 8f52a2e0e9
commit c43e1e379d

View 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 ) {