Skip to content
Permalink
Browse files

Fixes #8177. XHR transport now considers 304 Not Modified responses a…

…s 200 OK if no conditional request header was provided (as per the XMLHttpRequest specification).
  • Loading branch information
jaubourg committed Feb 5, 2011
1 parent 2c77704 commit d6fbbe1080fdcaf8eb22753eddf000aeb7d99545
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/ajax/xhr.js
@@ -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

0 comments on commit d6fbbe1

Please sign in to comment.
You can’t perform that action at this time.