aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-01-19 18:16:29 +0100
committerjaubourg <j@ubourg.net>2011-01-19 18:16:29 +0100
commit1cecfa1ece0d48b253fb0775bba645c464e363a4 (patch)
treed70fe68a20c78ffd24b320fea67fc12606f4c87f /src/ajax
parent3ea366401f461cd670c5472ddbb3ad7f3260d13c (diff)
downloadjquery-1cecfa1ece0d48b253fb0775bba645c464e363a4.tar.gz
jquery-1cecfa1ece0d48b253fb0775bba645c464e363a4.zip
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).
Diffstat (limited to 'src/ajax')
-rw-r--r--src/ajax/xhr.js5
1 files changed, 2 insertions, 3 deletions
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 );