From: John Resig Date: Fri, 20 Jul 2007 18:58:22 +0000 (+0000) Subject: Made the error message equal to "timeout", if the request timed out. (Bug #970) X-Git-Url: http://git.asbjorn.biz/?a=commitdiff_plain;ds=sidebyside;h=a40f141f23a3e3addcfae71676ff187f139eb8cb;p=jquery.git Made the error message equal to "timeout", if the request timed out. (Bug #970) --- diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js index 4fb63c0..65ae119 100644 --- a/src/ajax/ajax.js +++ b/src/ajax/ajax.js @@ -655,10 +655,10 @@ jQuery.extend({ var status; try { - status = jQuery.httpSuccess( xml ) && isTimeout != "timeout" ? - s.ifModified && jQuery.httpNotModified( xml, s.url ) ? "notmodified" : "success" : "error"; + status = isTimeout || (jQuery.httpSuccess( xml ) ? + s.ifModified && jQuery.httpNotModified( xml, s.url ) ? "notmodified" : "success" : "error"); // Make sure that the request was successful or notmodified - if ( status != "error" ) { + if ( status != "error" && status != "timeout" ) { // Cache Last-Modified header, if ifModified mode. var modRes; try {