Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use lower case constants for headers (fixes Rack > 2 applications) #660

Conversation

davidalejandroaguilar
Copy link

@davidalejandroaguilar davidalejandroaguilar commented Nov 3, 2023

On Rack 3 rack/rack#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.

@tomasc
Copy link
Contributor

tomasc commented Mar 31, 2024

see #682

@janko
Copy link
Member

janko commented Apr 28, 2024

Closing in favor of #682.

@janko janko closed this Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants