Closed dploeger closed 7 years ago
I'm having the exact same problem, for now I will change my header to all lower case.
fixed in next version 3.0.1
thnx.
Ah, thank you very much.
Thanks for your quick response, however I don't think this has been fixed, now you just changed it to use capital letters, I don't think it should be case sensitive:
contentType = request.headers["Content-Type"] && request.headers["Content-Type"].replace(/ /g, '');
I've just spend some hours debugging code that just ran into nirvana with Node Rest Client.
Turned out, the problem was, that I've specified the header "Content-Type" instead of "content-type". In line line 103 of nrc-serializer-manager, the header is parsed using a lower case form. In my case, the data were serialized to "[Object]", because the JSON serializer didn't kick in. One I changed the header to lower case, all works fine.
This doesn't comply to RFC2616, which documents headers in mixed case, but also states, that the header keys are case insensitive.
I wanted to check back with you, why you've chosen this implementation before submitting a pull request.