}
//Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions,
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jXHR,
dataType /* internal */, inspected /* internal */ ) {
dataType = dataType || options.dataTypes[ 0 ];
selection;
for(; i < length && ( executeOnly || !selection ); i++ ) {
- selection = list[ i ]( options, originalOptions );
+ selection = list[ i ]( options, originalOptions, jXHR );
// If we got redirected to another dataType
// we try there if not done already
if ( typeof selection === "string" ) {
} else {
options.dataTypes.unshift( selection );
selection = inspectPrefiltersOrTransports(
- structure, options, originalOptions, selection, inspected );
+ structure, options, originalOptions, jXHR, selection, inspected );
}
}
}
// we try the catchall dataType if not done already
if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
selection = inspectPrefiltersOrTransports(
- structure, options, originalOptions, "*", inspected );
+ structure, options, originalOptions, jXHR, "*", inspected );
}
// unnecessary when only executing (prefilters)
// but it'll be ignored by the caller in that case
} catch(e) {
// We have a parsererror
statusText = "parsererror";
- error = "" + e;
+ error = e;
}
}
} else {
};
// Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (#5856: IE7 issue with protocol-less urls)
+ // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
// We also use the url parameter if available
s.url = ( "" + ( url || s.url ) ).replace( rhash, "" ).replace( rprotocol, protocol + "//" );
}
// Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options );
+ inspectPrefiltersOrTransports( prefilters, s, options, jXHR );
// Uppercase the type
s.type = s.type.toUpperCase();
}
// Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options );
+ transport = inspectPrefiltersOrTransports( transports, s, options, jXHR );
// If no transport, we auto-abort
if ( !transport ) {
} catch (e) {
// Propagate exception as error if not done
if ( status < 2 ) {
- done( -1, "" + e );
+ done( -1, e );
// Simply rethrow otherwise
} else {
jQuery.error( e );
conversion,
// Conversion function
conv,
- // Conversion functions (when text is used in-between)
+ // Conversion functions (transitive conversion)
conv1,
conv2;