diff --git a/lib/XMLHttpRequest.js b/lib/XMLHttpRequest.js index 949fdf9..94ba128 100644 --- a/lib/XMLHttpRequest.js +++ b/lib/XMLHttpRequest.js @@ -348,7 +348,7 @@ exports.XMLHttpRequest = function() { } else if (data) { headers["Content-Length"] = Buffer.isBuffer(data) ? data.length : Buffer.byteLength(data); - if (!headers["Content-Type"]) { + if (Object.keys(headers).filter(function(key) { return key.toLowerCase() === 'content-type'; }).length === 0) { headers["Content-Type"] = "text/plain;charset=UTF-8"; } } else if (settings.method === "POST") {