aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-02-11 07:07:06 +0100
committerjaubourg <j@ubourg.net>2011-02-11 07:07:06 +0100
commitf2e0ae1a3932d6089853e8c0eed6ecb446610c00 (patch)
treea427912827762c80c7292511a6a6278d7c629aca /src/ajax
parent3a1d7a3c7c5349021f6dae979ab9b8609ae8f105 (diff)
downloadjquery-f2e0ae1a3932d6089853e8c0eed6ecb446610c00.tar.gz
jquery-f2e0ae1a3932d6089853e8c0eed6ecb446610c00.zip
Fixes #8245. Ajax now ensures header names are capitalized so that non-compliant xhr implementations don't override them.
Diffstat (limited to 'src/ajax')
-rw-r--r--src/ajax/xhr.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js
index c48ac901f..e21847aa8 100644
--- a/src/ajax/xhr.js
+++ b/src/ajax/xhr.js
@@ -96,8 +96,8 @@ if ( jQuery.support.ajax ) {
// Not set for crossDomain requests with no content
// (see why at http://trac.dojotoolkit.org/ticket/9486)
// Won't change header if already provided
- if ( !( s.crossDomain && !s.hasContent ) && !headers["x-requested-with"] ) {
- headers[ "x-requested-with" ] = "XMLHttpRequest";
+ if ( !( s.crossDomain && !s.hasContent ) && !headers["X-Requested-With"] ) {
+ headers[ "X-Requested-With" ] = "XMLHttpRequest";
}
// Need an extra try/catch for cross domain requests in Firefox 3