git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2c77704
)
Fixes #8177. XHR transport now considers 304 Not Modified responses as 200 OK if...
author
jaubourg
<j@ubourg.net>
Sat, 5 Feb 2011 02:08:35 +0000
(
03:08
+0100)
committer
jaubourg
<j@ubourg.net>
Sat, 5 Feb 2011 02:08:35 +0000
(
03:08
+0100)
src/ajax/xhr.js
patch
|
blob
|
history
diff --git
a/src/ajax/xhr.js
b/src/ajax/xhr.js
index
91a71de
..
b18274c
100644
(file)
--- a/
src/ajax/xhr.js
+++ b/
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;
// 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
// Status 0 encompasses several cases
} else if ( !status ) {
// Cross-domain