From c43e1e379d4158635b9cd0e2aaeb53f98fe9dd7b Mon Sep 17 00:00:00 2001 From: John Resig Date: Sun, 18 Jun 2006 01:42:41 +0000 Subject: [PATCH] Improved the robustness of the response codes based upon what's in Dojo. (Ticket #14) --- ajax/ajax.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ajax/ajax.js b/ajax/ajax.js index 8e0f81f..b0a993c 100644 --- a/ajax/ajax.js +++ b/ajax/ajax.js @@ -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 ) { -- 1.7.10.4