aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-01-31 10:13:54 +0100
committerjaubourg <j@ubourg.net>2011-01-31 10:13:54 +0100
commit91ca71daaab767f288f7173733f2bd907d8397a8 (patch)
tree113c97513e89428181918cef695dc03615ff3fc4
parent945ac0d0b1cdb58ade92c7d57a1f4a51b2b799a4 (diff)
downloadjquery-91ca71daaab767f288f7173733f2bd907d8397a8.tar.gz
jquery-91ca71daaab767f288f7173733f2bd907d8397a8.zip
Ensures dataTypeExpressions are lowercased for prefilters and transports registrations.
-rw-r--r--src/ajax.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 383ba2b1f..363e9c851 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