-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Header names are not case-sensitive #51
Comments
Thanks for reporting and you're absolutely right, this has been on my mind for a while. I'm in favor of @clue what is your take on this? |
Or could go for a class that behaves as an array and makes them case-insensitive |
Absolutely! 👍 Afaict most occurrences will be replaced with PR #41 anyway, but we should definitely keep an eye on this.
Yeah, this should do it for now (http://php.net/array_change_key_case). Eventually we will look into supporting PSR-7 (#28), by then we will also follow proper message semantics while preserving header case information. FWIW, RFC 2616 has been replaced with this:
|
Will we ever see #41? It's a year in making now (sad). |
@andig It's nearing completion see #41 (comment) see the issues mentioned in that comment. You're input on those is valued 👍 |
I'm currently looking into this and will file a PR for the upcoming v0.4.4 release. See #103 for the first step here. |
https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
Each header field consists of a name followed by a colon (":") and the field value. Field names are case-insensitive
Currently the code heavily relies on case-sensitive names.
Also Content-Type can contain a charset or additional information after
;
character. Example:Content-Type: application/x-www-form-urlencoded; charset=utf-8
Such header break currently content parsing because of this.We tried to fix it in PPM: https://github.com/php-pm/php-pm/blob/master/React/RequestParser.php#L18, but I believe we should fix it directly in reactphp/http.
The text was updated successfully, but these errors were encountered: