X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fajax.js;h=4258b674428a68f5954fac63dc4f6bfa26134261;hb=389c099df686bd104ce0aab3361a94ebf3a05ce6;hp=383ba2b1ff8543f824cbb0ce9b3a966800527779;hpb=bbd3f4f3fe66fc4ce6c6db31a17a1c04037323be;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index 383ba2b..4258b67 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -48,7 +48,7 @@ function addToPrefiltersOrTransports( structure ) { } if ( jQuery.isFunction( func ) ) { - var dataTypes = dataTypeExpression.split( rspacesAjax ), + var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ), i = 0, length = dataTypes.length, dataType, @@ -62,7 +62,7 @@ function addToPrefiltersOrTransports( structure ) { // any existing element placeBefore = /^\+/.test( dataType ); if ( placeBefore ) { - dataType = dataType.substr( 1 ); + dataType = dataType.substr( 1 ) || "*"; } list = structure[ dataType ] = structure[ dataType ] || []; // then we add to the structure accordingly @@ -736,9 +736,9 @@ function buildParams( prefix, obj, traditional, add ) { // Serialize object item. } else { - jQuery.each( obj, function( k, v ) { - buildParams( prefix + "[" + k + "]", v, traditional, add ); - }); + for ( var name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } } } else {