Skip to content

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

Merged
miyagawa merged 1 commit intomasterfrom
lc-psgi-headers
Feb 16, 2017
Merged

Lowercase headers before passing to HTTP::Headers::Fast#585
miyagawa merged 1 commit intomasterfrom
lc-psgi-headers

Conversation

@miyagawa
Copy link
Copy Markdown
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
Copy Markdown
Member Author

@tokuhirom @kazeburo

@kazeburo
Copy link
Copy Markdown
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.

2 participants