node-XMLHttpRequest icon indicating copy to clipboard operation
node-XMLHttpRequest copied to clipboard

I suspect that content-type should be case insensitive

Open MichaelWehar opened this issue 5 years ago • 2 comments

https://github.com/driverdan/node-XMLHttpRequest/blob/97966e4ca1c9f2cc5574d8775cbdacebfec75455/lib/XMLHttpRequest.js#L369

Currently, it appears that it assumes content-type is written as "Content-Type".

MichaelWehar avatar Apr 20 '20 08:04 MichaelWehar

See here: https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2

"Field names are case-insensitive."

MichaelWehar avatar Apr 20 '20 08:04 MichaelWehar

I just hit a bug due to this, a client was setting content-type instead of the Content-Type that was being checked for, causing breakage.

MythicManiac avatar May 27 '20 13:05 MythicManiac