Side navigation
Ticket #970: ajax-status-timeout.patch
File ajax-status-timeout.patch, 1.2 KB (added by skarkkai, July 18, 2007 08:31PM UTC)
The second parameter of ajax error callback is "timeout" when error is due to a timeout
--- jquery-nightly-20070710.js.orig 2007-07-10 23:46:56.000000000 +0300
+++ jquery-nightly-20070710.js 2007-07-10 23:49:59.000000000 +0300
@@ -1839,10 +1839,10 @@
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 {
Download in other formats:
Original Format
File ajax-status-timeout.patch, 1.2 KB (added by skarkkai, July 18, 2007 08:31PM UTC)
The second parameter of ajax error callback is "timeout" when error is due to a timeout
--- jquery-nightly-20070710.js.orig 2007-07-10 23:46:56.000000000 +0300
+++ jquery-nightly-20070710.js 2007-07-10 23:49:59.000000000 +0300
@@ -1839,10 +1839,10 @@
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 {