Commit dc8491de authored by John Resig's avatar John Resig

Scratch that, just punting on Opera and 304s for now - there may not be a good...

Scratch that, just punting on Opera and 304s for now - there may not be a good solution here. Fixes #6060.
parent ba9e0fc1
...@@ -629,11 +629,8 @@ jQuery.extend( jQuery.ajax, { ...@@ -629,11 +629,8 @@ jQuery.extend( jQuery.ajax, {
try { try {
// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450 // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
return !xhr.status && location.protocol === "file:" || return !xhr.status && location.protocol === "file:" ||
( xhr.status >= 200 && xhr.status < 300 ) || xhr.status >= 200 && xhr.status < 300 ||
xhr.status === 304 || xhr.status === 1223 || xhr.status === 304 || xhr.status === 1223;
// Opera returns a status of 0 for redirects -
// We can detect this by the fact that Opera also doesn't return any headers
xhr.status === 0 && !xhr.getAllResponseHeaders();
} catch(e) {} } catch(e) {}
return false; return false;
...@@ -652,8 +649,7 @@ jQuery.extend( jQuery.ajax, { ...@@ -652,8 +649,7 @@ jQuery.extend( jQuery.ajax, {
jQuery.ajax.etag[url] = etag; jQuery.ajax.etag[url] = etag;
} }
// Opera returns 0 when status is 304 return xhr.status === 304;
return xhr.status === 304 || xhr.status === 0 && !xhr.getAllResponseHeaders();
}, },
httpData: function( xhr, type, s ) { httpData: function( xhr, type, s ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment