Skip to content
Permalink
Browse files

Ensures dataTypeExpressions are lowercased for prefilters and transpo…

…rts registrations.
  • Loading branch information
jaubourg committed Jan 31, 2011
1 parent 945ac0d commit 91ca71daaab767f288f7173733f2bd907d8397a8
Showing with 2 additions and 2 deletions.
  1. +2 −2 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

0 comments on commit 91ca71d

Please sign in to comment.
You can’t perform that action at this time.