diff options
author | byroot <jean.boussier@gmail.com> | 2013-01-24 02:33:17 +0100 |
---|---|---|
committer | jaubourg <j@ubourg.net> | 2013-01-24 02:35:07 +0100 |
commit | eb47553eeac58861bcefac063c0e03e161b4d52c (patch) | |
tree | 7ff3d18065a4080e73dd8b50459d3b7651520197 /src | |
parent | 21af3a9213a2ad0f9996f2ef4f2d8ee53a3f45d4 (diff) | |
download | jquery-eb47553eeac58861bcefac063c0e03e161b4d52c.tar.gz jquery-eb47553eeac58861bcefac063c0e03e161b4d52c.zip |
Don't try and convert data for 204 No Content responses. Fixes #13292. Fixes #13261.
Diffstat (limited to 'src')
-rw-r--r-- | src/ajax.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ajax.js b/src/ajax.js index 6dd34a732..a7508e972 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -624,12 +624,17 @@ jQuery.extend({ } } - // If not modified - if ( status === 304 ) { + // if no content + if ( status === 204 ) { + isSuccess = true; + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { isSuccess = true; statusText = "notmodified"; - // If we have data + // If we have data, let's convert it } else { isSuccess = ajaxConvert( s, response ); statusText = isSuccess.state; |