Do not fix case of header key#1063
Conversation
bertm
left a comment
There was a problem hiding this comment.
Technically we should use proper casing where we can. RFC 2616 (HTTP/1.1) section 4.2 Message Headers states the following:
Applications ought to follow "common form", where
one is known or indicated, when generating HTTP constructs, since
there might exist some implementations that fail to accept anything
beyond the common forms.
Per the Hypertext Transfer Protocol (HTTP) Field Name Registry
all the header names are capitalized, so that would be the "common form" for generating those header names.
That said: meh, let's not do magic header name rewriting (reasonable client should read them case insensitive). If this does cause an issue (which it won't), fix it at the source (where the incorrectly capatilized header name is used).
HTTP/2 is not relevant though, as fred does not speak that.
There isn't broken HTTP clients. All headers are forced lower-case by HTTP/2. Don't need to do this a dozen times for every request.