-
Notifications
You must be signed in to change notification settings - Fork 45
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 authorization header creates a broken request #188
Comments
We should probably make it case insensitive then? Why do I feel like we've had this debate over and over again 🤔 The discrepancy is caused by this method: |
I think so yes. RFC says header names are case-insensitive. https://tools.ietf.org/html/rfc7230#section-3.2 "Each header field consists of a case-insensitive field name followed by a colon (":"), optional leading whitespace, the field value, and optional trailing whitespace." |
hey, any news on this? |
Fixed with this release https://github.com/slimphp/Slim-Psr7/releases/tag/1.4 |
Given the following example code:
Yields the following results:
The latter result can be considered broken. Taken from rfc2616:
"Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)]. It MUST be possible to combine the multiple header fields into one "field-name: field-value" pair, without changing the semantics of the message, by appending each subsequent field-value to the first, each separated by a comma."
Also author of the spec says it is not valid to specify multiple Authorization fields.
"You can only use multiple header fields when they are defined using list syntax."
I assume the bug is somewhere in
slim/psr7
since problem goes away when changing the PSR-7 implementation:See also: tuupola/slim-basic-auth#105, tuupola/slim-basic-auth#89, #179
The text was updated successfully, but these errors were encountered: