From d66cc553167c6b00d19aa62a4dd1e9affb20d395 Mon Sep 17 00:00:00 2001 From: jaubourg Date: Fri, 4 Feb 2011 21:50:18 +0100 Subject: [PATCH] Disables dataType redirection while selecting transport. --- src/ajax.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ajax.js b/src/ajax.js index b361a2a..f33bd49 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -113,9 +113,9 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX for(; i < length && ( executeOnly || !selection ); i++ ) { selection = list[ i ]( options, originalOptions, jqXHR ); // If we got redirected to another dataType - // we try there if not done already + // we try there if executing only and not done already if ( typeof selection === "string" ) { - if ( inspected[ selection ] ) { + if ( !executeOnly || inspected[ selection ] ) { selection = undefined; } else { options.dataTypes.unshift( selection ); -- 1.7.10.4