Closed dominicletz closed 2 years ago
We don't do this on purpose to avoid the performance penalty. Although there is a config for plug to warn if you use mixed headers. Maybe we should enable it for Phoenix dev?
Ah, it is enabled by default. It only does so during test. Maybe we should enable it on all cases... but that would be a separate discussion. Closing this for now, thanks @dominicletz !
I just ran into this issue when switching to http/2 that suddenly some of my responses were invalid. The root cause turned out to be my code using "This-Type-Of-Capitalization" for HTTP headers and the cowboy adapter is not converting that. Thinking myself the adapter should do this I've googled a bit and found this confirming opinion piece :-) github.com/elixir-plug/plug/issues/197#issuecomment-76516098
So here is the patch, let me know if that is the right location to make this change.