Closed elyobo closed 7 years ago
Resolves #91
Added tests.
Note that this fix maintains the case insensitive access (to set, get and delete) but still sends the headers in the case given.
@substack I notice that there hasn't been a lot of activity here recently (big queue of unmerged PRs, mainly old) - is this still maintained?
Please merge or close if there's no interesting in fixing this bug.
While headers are meant to be case sensitive, many servers do not respect this. Node maintains the casing of the request headers in order to work with this and http-browserify should do likewise in order to be consistent with the node implementation.
This patch maintains the casing with which the header was last set, e.g. setting header "fOo", then header "Foo" will still only send one header, but will use the final casing "Foo". This is compatible with the node implementation.