Commit 91ca71da authored by jaubourg's avatar jaubourg

Ensures dataTypeExpressions are lowercased for prefilters and transports registrations.

parent 945ac0d0
...@@ -48,7 +48,7 @@ function addToPrefiltersOrTransports( structure ) { ...@@ -48,7 +48,7 @@ function addToPrefiltersOrTransports( structure ) {
} }
if ( jQuery.isFunction( func ) ) { if ( jQuery.isFunction( func ) ) {
var dataTypes = dataTypeExpression.split( rspacesAjax ), var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
i = 0, i = 0,
length = dataTypes.length, length = dataTypes.length,
dataType, dataType,
...@@ -62,7 +62,7 @@ function addToPrefiltersOrTransports( structure ) { ...@@ -62,7 +62,7 @@ function addToPrefiltersOrTransports( structure ) {
// any existing element // any existing element
placeBefore = /^\+/.test( dataType ); placeBefore = /^\+/.test( dataType );
if ( placeBefore ) { if ( placeBefore ) {
dataType = dataType.substr( 1 ); dataType = dataType.substr( 1 ) || "*";
} }
list = structure[ dataType ] = structure[ dataType ] || []; list = structure[ dataType ] = structure[ dataType ] || [];
// then we add to the structure accordingly // then we add to the structure accordingly
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment