From 1cecfa1ece0d48b253fb0775bba645c464e363a4 Mon Sep 17 00:00:00 2001 From: jaubourg Date: Wed, 19 Jan 2011 18:16:29 +0100 Subject: Moves determineDataType into ajaxSettings so that it is accessible to transports without the need for a second argument and so that we can now pass the original options to the transport instead. Also ensures the original options are actually propagated to prefilters (they were not). --- src/ajax/xhr.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ajax') diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js index 0f30469d6..4acb70054 100644 --- a/src/ajax/xhr.js +++ b/src/ajax/xhr.js @@ -53,7 +53,7 @@ testXHR = undefined; // Create transport if the browser can provide an xhr if ( jQuery.support.ajax ) { - jQuery.ajaxTransport( function( s , determineDataType ) { + jQuery.ajaxTransport( function( s ) { // Cross domain only allowed if supported through XMLHttpRequest if ( ! s.crossDomain || jQuery.support.cors ) { @@ -186,8 +186,7 @@ if ( jQuery.support.ajax ) { // Guess response & update dataType accordingly response = - determineDataType( - s, + s.determineDataType( xhr.getResponseHeader("content-type"), xhr.responseText, xhr.responseXML ); -- cgit v1.2.3