plack / Plack

PSGI toolkit and server adapters
http://plackperl.org/
Other
486 stars 214 forks source link

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

Closed miyagawa closed 7 years ago

miyagawa commented 7 years ago

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.

miyagawa commented 7 years ago

@tokuhirom @kazeburo

kazeburo commented 7 years ago

LGTM