]> source.dussan.org Git - jquery.git/commitdiff
Disables dataType redirection while selecting transport.
authorjaubourg <j@ubourg.net>
Fri, 4 Feb 2011 20:50:18 +0000 (21:50 +0100)
committerjaubourg <j@ubourg.net>
Fri, 4 Feb 2011 20:50:18 +0000 (21:50 +0100)
src/ajax.js

index b361a2a735ca766b8fcd5c106972dbcb83e5d5c4..f33bd49afff22de0edb78486369c37809a92bfd4 100644 (file)
@@ -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 );