You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each header field consists of a name followed by a colon (":") and the field value. Field names are case-insensitive
Currently the codeheavily 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.
Activity
WyriHaximus commentedon Mar 19, 2016
Thanks for reporting and you're absolutely right, this has been on my mind for a while. I'm in favor of
strtolowerall the header names.@clue what is your take on this?
WyriHaximus commentedon Mar 19, 2016
Or could go for a class that behaves as an array and makes them case-insensitive
clue commentedon Mar 20, 2016
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:
pwhelan commentedon Mar 22, 2016
I actually went ahead and implemented a fix in PR #53 since I needed a fix for a work project. Hopefully #41 gets merged soon so I can drop my fix.
andig commentedon Oct 23, 2016
Will we ever see #41? It's a year in making now (sad).
WyriHaximus commentedon Oct 23, 2016
@andig It's nearing completion see #41 (comment) see the issues mentioned in that comment. You're input on those is valued 👍
clue commentedon Feb 10, 2017
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.