From eb47553eeac58861bcefac063c0e03e161b4d52c Mon Sep 17 00:00:00 2001 From: byroot Date: Thu, 24 Jan 2013 02:33:17 +0100 Subject: Don't try and convert data for 204 No Content responses. Fixes #13292. Fixes #13261. --- src/ajax.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') 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; -- cgit v1.2.3