On Rack 3 https://github.com/rack/rack/issues/1592, it was decided to lowercase all response headers. Thus, all logic in the codebase that checks for headers coming from Rack > 2 applications is broken.
This PR:
Uses lower case constants for headers.
It does so by checking Rack.release > "2" so that we keep compatibility with Rack 2.x and 1.6.x.
This introduces if statements that look a bit ugly, but that was the pattern I found was being used within the codebase.
Note
I'm yet to write some specs for this but wanted to get this draft out for potential discussion.
On Rack 3 https://github.com/rack/rack/issues/1592, it was decided to lowercase all response headers. Thus, all logic in the codebase that checks for headers coming from Rack > 2 applications is broken.
This PR:
Rack.release > "2"
so that we keep compatibility with Rack 2.x and 1.6.x.if
statements that look a bit ugly, but that was the pattern I found was being used within the codebase.Note
I'm yet to write some specs for this but wanted to get this draft out for potential discussion.