Commit d6fbbe10 authored by jaubourg's avatar jaubourg

Fixes #8177. XHR transport now considers 304 Not Modified responses as 200 OK...

Fixes #8177. XHR transport now considers 304 Not Modified responses as 200 OK if no conditional request header was provided (as per the XMLHttpRequest specification).
parent 2c77704b
......@@ -178,6 +178,12 @@ if ( jQuery.support.ajax ) {
// IE - #1450: sometimes returns 1223 when it should be 204
if ( status === 1223 ) {
status = 204;
// Various - #8177: a Not Modified response was received
// yet no conditional request headers was provided
} else if ( status === 304 &&
!headers[ "if-modified-since" ] &&
!headers[ "if-none-match" ] ) {
status = 200;
// Status 0 encompasses several cases
} else if ( !status ) {
// Cross-domain
......
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