X-Git-Url: http://git.asbjorn.it/?p=jquery.git;a=blobdiff_plain;f=src%2Fajax.js;h=39abe905940bbe760d4ba8057291912c03827ce3;hp=11eacee7190e92cf69ee3dc3ed724a9bb13a3afe;hb=7c9a5e6016c2fcd38872367a891e5b3887d3df53;hpb=485fa0c42a71b4decc9cb1ce08bb56efabcc76f3 diff --git a/src/ajax.js b/src/ajax.js index 11eacee..39abe90 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -842,8 +842,9 @@ function ajaxConvert( s, response ) { } var dataTypes = s.dataTypes, - converters = s.converters, + converters = {}, i, + key, length = dataTypes.length, tmp, // Current and previous dataTypes @@ -860,6 +861,16 @@ function ajaxConvert( s, response ) { // For each dataType in the chain for( i = 1; i < length; i++ ) { + // Create converters map + // with lowercased keys + if ( i === 1 ) { + for( key in s.converters ) { + if( typeof key === "string" ) { + converters[ key.toLowerCase() ] = s.converters[ key ]; + } + } + } + // Get the dataTypes prev = current; current = dataTypes[ i ];