-
Notifications
You must be signed in to change notification settings - Fork 299
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
HTTP Header parsing is inconsistent #170
Comments
Ironically, my main reason for starting to use an http client library instead of raw curl commands was to get consistent header parsing, so I was kind of surprised to encounter this issue that it overwrites multiple headers with the same name. +1 to this PR. |
voku
added a commit
to voku/httpful
that referenced
this issue
Apr 30, 2016
nategood
pushed a commit
that referenced
this issue
Jul 22, 2016
Solves issue #170: HTTP Header parsing is inconsistent
voku
added a commit
to voku/httpful
that referenced
this issue
Apr 29, 2019
* upstream/master: Add PHPDocs for __call methods. nategood#227 unset curl handle after it has been closed Fix download link Typo correction Removed remaining strtolower Don't lowercase header names Update HttpfulTest.php ConnectionErrorException cURLError Fix for frameworks that use object proxies added support for http_proxy environment variable Corrected namespace Always lowercase header names. Update the tests Update Response.php Solves issue nategood#170: HTTP Header parsing is inconsistent
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The parsing of a HTTP response headers diverges between
Response::_parseHeaders
andResponse\Headers::fromString
.fromString
just parses the header lines and overwrites multiple header line with the same header names, whereas_parseHeaders
references RFC2616 Sec 4.2 and concatenates multiple headers to a comma-separated list.A possible solution would be to move the code of
_parseHeaders
tofromString
and let_parseHeaders
callfromString
.The text was updated successfully, but these errors were encountered: