Don't try and convert data for 204 No Content responses. Fixes #13292. Fixes #13261.

This commit is contained in:
byroot
2013-01-24 02:33:17 +01:00
committed by jaubourg
parent 21af3a9213
commit eb47553eea
3 changed files with 33 additions and 3 deletions

View File

@@ -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;