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

Lowercase headers before passing to HTTP::Headers::Fast #585

Merged
merged 1 commit into from Feb 16, 2017

Conversation

miyagawa
Copy link
Member

HTTP::Headers::Fast tries to preserve the original case in initializer, but in PSGI they're all in upper-case from the environment. This makes a weird result when you try to print headers as a string or use the scan() method, where all incoming keys are all uppercase.

Because HTTP header field names are case insensitive, this should not really matter, but rather than trying to preserve the all-upper case that is coming from PSGI env, just pass it in lowercase, so that the default casing would just work.

HTTP::Headers::Fast tries to preserve the original case in
initializer, but in PSGI they're all in upper-case from the
environment. This makes a weird result when you try to print
headers as a string or use the scan() method, where all incoming
keys are all uppercase.
@miyagawa
Copy link
Member Author

@tokuhirom @kazeburo

@kazeburo
Copy link
Contributor

LGTM

@miyagawa miyagawa merged commit 995d475 into master Feb 16, 2017
miyagawa added a commit that referenced this pull request Feb 21, 2017
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

2 participants