+ oldStatusCode,
+
+ // Actual response
+ response;
+
+ // If we got responses:
+ // - find the right one
+ // - update dataTypes accordingly
+ // - set responseXXX accordingly too
+ if ( responses ) {
+
+ var contents = s.contents,
+ transportDataType = dataTypes[0],
+ ct,
+ type,
+ finalDataType;
+
+ // Auto (xml, json, script or text determined given headers)
+ if ( transportDataType === "*" && ( ct = jXHR.getResponseHeader( "content-type" ) ) ) {
+
+ for ( type in contents ) {
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
+ transportDataType = dataTypes[0] = type;
+ break;
+ }
+ }
+
+ type = undefined;
+ }
+
+ // Get final dataType
+ for( type in responses ) {
+ if ( ! finalDataType && type === transportDataType ) {
+ finalDataType = type;
+ }
+ responseField = responseFields[ type ];
+ if ( responseField && ! ( responseField in jXHR ) ) {
+ jXHR[ responseField ] = responses[ type ];
+ }
+ }
+
+ // If no response with the expected dataType was provided
+ // Take the last response as a default if it exists
+ if ( ! finalDataType && type ) {
+ finalDataType = type;
+ if ( transportDataType === "*" ) {
+ dataTypes.shift();
+ }
+ dataTypes.unshift( finalDataType );
+ }
+
+ // Get final response
+ response = responses[ finalDataType ];
+ }