Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
HTTP::Request: store common header names in a normalized way #8061
Doesn't actually fix it because we aren't storing exactly what was sent, but since headers are case insensitive this shouldn't be a problem. I think the "normalized" way is pretty common and used everywhere so in most cases this way will match what was sent.
If this is a real problem, though, we can revert this optimization.
Aug 8, 2019
From HTTP/2 and onwards the normalized form of HTTP headers is... downcased. And HTTP/2 is much more common that it would seem. We should embrace the future (that started yesterday) and just store headers lowercased, we're only going to receive them more and more downcased, even in HTTP/1.
Ho, @ysbaddaden is right. For example in GitHub response headers are all downcased:
But my request headers are in camelcase with dashes.
@j8r Yes, this is likely the way we're going to move forward. But it's not the point here. We don't want to introduce a breaking change at this point. On the contrary, this PR is supposed to be a bugfix in 0.30.1 for the behaviour that was unintentionally broken in 0.30.0.
The idea to normalize all headers downcased should be discussed in a separate issue and has a broader scope than just