driverdan / node-XMLHttpRequest

XMLHttpRequest for node.js

Home Page:http://thedanexperiment.com/2009/10/04/emulating-xmlhttprequest-in-node-js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default 'Content-Type' header is added if the request header is created with lowercase 'content-type'.

weavst opened this issue · comments

Should allow for lowercase 'content-type' header, without adding the default 'Content-Type': 'text/plain;charset=UTF-8'. If two content-type headers are present on the request it usually results in an error.

if (!headers["Content-Type"] && !headers["content-type"]) { headers["Content-Type"] = "text/plain;charset=UTF-8"; }

Looks like this issue was fixed, just not updated in NPM package.