[Pkg-javascript-commits] [dojo] 24/27: Fix bad logic in xhr that tries to avoid double-setting Content-Type

David Prévot taffit at moszumanska.debian.org
Sun Sep 14 16:23:07 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag 1.7.6
in repository dojo.

commit 33e102dfe99c201efdb817931167261cf4985e9b
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.
---
 _base/xhr.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/_base/xhr.js b/_base/xhr.js
index 0f265db..c93cde1 100644
--- a/_base/xhr.js
+++ b/_base/xhr.js
@@ -710,8 +710,10 @@ define([
 		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