browserify / http-browserify

node's http module, but for the browser
MIT License
244 stars 110 forks source link

Maintain request header casing. #98

Closed elyobo closed 7 years ago

elyobo commented 8 years ago

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.

elyobo commented 8 years ago

Resolves #91

elyobo commented 8 years ago

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.

elyobo commented 8 years ago

@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?

elyobo commented 7 years ago

Please merge or close if there's no interesting in fixing this bug.