[Pkg-javascript-commits] [dojo] 02/03: Fix bad logic in xhr that tries to avoid double-setting Content-Type
David Prévot
taffit at moszumanska.debian.org
Tue Dec 9 17:50:36 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.4.6
in repository dojo.
commit 3036b230e7b3694b8b01d628bc5d0c88020e4e9a
Author: Colin Snover <github.com at zetafleet.com>
Date: Sat Aug 23 05:42:28 2014 +0000
Fix bad logic in xhr that tries to avoid double-setting Content-Type
Fixes #18237.
(cherry picked from commit 33e102dfe99c201efdb817931167261cf4985e9b)
(cherry picked from commit e6074b1e97131d86c0cf978d9f8c7856f380557d)
(cherry picked from commit 4695f6ac912fc56f63c556a1ca3101066b444074)
---
_base/xhr.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/_base/xhr.js b/_base/xhr.js
index b797cf0..a2967e0 100644
--- a/_base/xhr.js
+++ b/_base/xhr.js
@@ -861,8 +861,10 @@ dojo.require("dojo._base.query");
xhr.open(method, ioArgs.url, args.sync !== true, args.user || undefined, args.password || undefined);
if(args.headers){
for(var hdr in args.headers){
- if(hdr.toLowerCase() === "content-type" && !args.contentType){
- args.contentType = args.headers[hdr];
+ if(hdr.toLowerCase() === "content-type"){
+ if(!args.contentType){
+ args.contentType = args.headers[hdr];
+ }
}else if(args.headers[hdr]){
//Only add header if it has a value. This allows for instnace, skipping
//insertion of X-Requested-With by specifying empty value.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git
More information about the Pkg-javascript-commits
mailing list