Fixes #7868. ResponseText is now properly propagated for error callbacks.
[jquery.git] / src / ajax / xhr.js
index 032668f..a2ec4a4 100644 (file)
@@ -137,15 +137,13 @@ jQuery.ajax.transport( function( s , determineDataType ) {
                                                                                        status
                                                                        );
 
-                                                       // Guess response if needed & update datatype accordingly
-                                                       if ( status >= 200 && status < 300 ) {
-                                                               response =
-                                                                       determineDataType(
-                                                                               s,
-                                                                               xhr.getResponseHeader("content-type"),
-                                                                               xhr.responseText,
-                                                                               xhr.responseXML );
-                                                       }
+                                                       // Guess response & update dataType accordingly
+                                                       response =
+                                                               determineDataType(
+                                                                       s,
+                                                                       xhr.getResponseHeader("content-type"),
+                                                                       xhr.responseText,
+                                                                       xhr.responseXML );
                                                }
 
                                                // Call complete