aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2011-08-25 12:17:50 -0700
committerDave Methvin <dave.methvin@gmail.com>2011-08-25 12:17:50 -0700
commit979dd1cb421a6880463f98842353461a0f1fae6e (patch)
tree0d1a1cf83e4bc5d947defd5c78bbeea34571c787
parentdb9e023e62c1ff5d8f21ed9868ab6878da2005e9 (diff)
parent8cabdcd1225a6418d8325209c07e43d2c92633c6 (diff)
downloadjquery-979dd1cb421a6880463f98842353461a0f1fae6e.tar.gz
jquery-979dd1cb421a6880463f98842353461a0f1fae6e.zip
Merge pull request #473 from dmethvin/fix-10098-faux-comment
Fixes #10098. Avoid a slashy-starry char sequence to prevent T-Mobile (and other brain-damaged) script compression breaking jQuery.
-rw-r--r--src/ajax.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ajax.js b/src/ajax.js
index e12139e9e..623e9fe71 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -42,7 +42,10 @@ var r20 = /%20/g,
ajaxLocation,
// Document location segments
- ajaxLocParts;
+ ajaxLocParts,
+
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+ allTypes = ["*/"] + ["*"];
// #8138, IE may throw an exception when accessing
// a field from window.location if document.domain has been set
@@ -331,7 +334,7 @@ jQuery.extend({
html: "text/html",
text: "text/plain",
json: "application/json, text/javascript",
- "*": "*/*"
+ "*": allTypes
},
contents: {
@@ -702,7 +705,7 @@ jQuery.extend({
jqXHR.setRequestHeader(
"Accept",
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", */*; q=0.01" : "" ) :
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
s.accepts[ "*" ]
);