mikeal/request — pull request #1211 by nylen (2014-10-24 16:43:55+00:00)
Title: Allow 'Host' header instead of 'host' and remember case across redirects

As of v2.46.0 (because of #1184) we get a crash when the user specifies `{ headers : Host }` and a redirect occurs. This fixes #1210, see that issue for details.

We should also preserve the case of the header name if the user specifies `Host`, because lots of (broken) servers expect the header name to be `Host` and not `host`, and this has been an issue for a lot of people: #346, #406, #411, #426, #430, #990, #1210.

Needs review @mikeal @FredKSchott @seanstrom @tbuchok and anyone else. The test especially is a little hairy, so I'm definitely open to better ways of doing it.