I'm running Hyper server and I noticed that capitalization of response headers was lost somewhere between the versions 0.11.27 and 0.12.1. Is this intentional? New behavior:

At least the RFC notes that the headers are case-insensitive:
https://tools.ietf.org/html/rfc2616#page-31
Ja huumeet.info, tori jne :D
Yes, this is expected. The HeaderName from the http crate keeps things lowercase for performance and compatibility with HTTP2.
HTTP/1 clients and servers should work just fine with any case, since RFC7230 declares them as case-insensitive. There are the occasional clients or servers that erroneously require title case headers. There was a config option added for the client to use title case, and if there's need, we can also add a server option.
I'm dealing with a "hard to please" client, and title case headers is one of the things I have to use. So this is a feature I would love to see.
Adding the option to the server is... kind of "easy", in that it can make use of the title case function used by the client encoding. The only tricky part I see is that the Server::encode function is highly optimized, so checking a boolean in a loop may be unfortunate. I wonder if there's something clever that can be done to avoid that.
I'm having this problem too. I'm writing a proxy and this is causing the proxied request be different from the original request. Maybe i can make some tests and try to work on a pull request?
I also would like this feature. I looked at the code but it seems header encoding for the server is not quite the same as for the client.
Can someone point me in the right direction of how this could be tackled? Then I can try to submit a PR.
Most helpful comment
At least the RFC notes that the headers are case-insensitive:
https://tools.ietf.org/html/rfc2616#page-31
Ja huumeet.info, tori jne :D