aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax.js
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2010-12-28 02:30:51 +0100
committerjaubourg <j@ubourg.net>2010-12-31 04:15:09 +0100
commit6165cc45b7f673aa0d9daf33659a2783f68a45ac (patch)
tree602a30fe19c687559bb165de3f8c11ffddef18aa /src/ajax.js
parent2a5c16f217416a7cb5afce72a0f25c66d074fc0c (diff)
downloadjquery-6165cc45b7f673aa0d9daf33659a2783f68a45ac.tar.gz
jquery-6165cc45b7f673aa0d9daf33659a2783f68a45ac.zip
Renamed several ajaxSettings options. Removed cors test, fixed failing cors test.
Diffstat (limited to 'src/ajax.js')
-rw-r--r--src/ajax.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 7c0e1018d..19ec83679 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -183,7 +183,7 @@ jQuery.extend({
"*": "*/*"
},
- autoDataType: {
+ contents: {
xml: /xml/,
html: /html/,
json: /json/
@@ -208,7 +208,7 @@ jQuery.extend({
// List of data converters
// 1) key format is "source_type destination_type" (a single space in-between)
// 2) the catchall symbol "*" can be used for source_type
- dataConverters: {
+ converters: {
// Convert anything to text
"* text": window.String,
@@ -398,7 +398,7 @@ jQuery.extend({
oneConv,
convertion,
dataTypes = s.dataTypes,
- dataConverters = s.dataConverters,
+ converters = s.converters,
responses = {
"xml": "XML",
"text": "Text"
@@ -420,14 +420,14 @@ jQuery.extend({
if ( prev !== "*" && current !== "*" && prev !== current ) {
oneConv = conv1 =
- dataConverters[ ( conversion = prev + " " + current ) ] ||
- dataConverters[ "* " + current ];
+ converters[ ( conversion = prev + " " + current ) ] ||
+ converters[ "* " + current ];
if ( oneConv !== true ) {
if ( ! oneConv && prev !== "text" && current !== "text" ) {
- conv1 = dataConverters[ prev + " text" ] || dataConverters[ "* text" ];
- conv2 = dataConverters[ "text " + current ];
+ conv1 = converters[ prev + " text" ] || converters[ "* text" ];
+ conv2 = converters[ "text " + current ];
}
if ( oneConv || conv1 && conv2 ) {
@@ -841,7 +841,7 @@ jQuery.each( [ "prefilter" , "transport" ] , function( _ , name ) {
// (for those transports that can give text or xml responses)
function determineDataType( s , ct , text , xml ) {
- var autoDataType = s.autoDataType,
+ var contents = s.contents,
type,
regexp,
dataTypes = s.dataTypes,
@@ -851,8 +851,8 @@ function determineDataType( s , ct , text , xml ) {
// Auto (xml, json, script or text determined given headers)
if ( transportDataType === "*" ) {
- for ( type in autoDataType ) {
- if ( ( regexp = autoDataType[ type ] ) && regexp.test( ct ) ) {
+ for ( type in contents ) {
+ if ( ( regexp = contents[ type ] ) && regexp.test( ct ) ) {
transportDataType = dataTypes[0] = type;
break;
}
@@ -871,7 +871,7 @@ function determineDataType( s , ct , text , xml ) {
response = text;
- // If it's not really text, defer to dataConverters
+ // If it's not really text, defer to converters
if ( transportDataType !== "text" ) {
dataTypes.unshift( "text" );
}