-
Notifications
You must be signed in to change notification settings - Fork 300
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
Update src/Httpful/Response.php #50
Conversation
Fixed the override of a header key with multiples name, example Set-Cookie appears more than once.
I'm on the fence as to whether or not headers that occur more than once should be represented as an array or as a concatenated string. Regardless you are correct, we need to handle this better than just overwriting it :-). |
Thanks for the reply, I found a bug on my fix, I ended up making a new if($key=='Set-Cookie') I end up doing this, and only storing the cookie portion and ignoring the On Sat, Sep 15, 2012 at 10:56 AM, Nate Good [email protected]:
|
I'm glad you found a solution. After digging into it, it appears, though while it is valid to have multiple headers with the same name, the HTTP spec states that such a case MUST also be able to be represented as single header with a comma separated list.
The cookie RFC outlines this this too (see 4.2.2). Because of this, all headers that appear more than once will appears as a comma-separated list. I understand that this could be wacky for Set-Cookie header because in some cases the values contain |
Keep me posted Sent from my iPhone On Sep 15, 2012, at 11:19 AM, Nate Good [email protected] wrote: I'm glad you found a solution. After digging into it, it appears, though Multiple message-header fields with the same field-name may be present in a The cookie RFC http://www.ietf.org/rfc/rfc2109.txt outlines this this too Because of this, all headers that appear more than once will appears as a — |
The name making to the classes are wrong, I'm assuming you tested this on a On Sat, Sep 15, 2012 at 11:40 AM, Jose Medina [email protected] wrote:
|
No. I usually avoid Windows when possible. Can you elaborate? |
I originally had a problem when I installed, file not being found, linux On Tue, Sep 18, 2012 at 11:34 AM, Nate Good [email protected]:
|
Fixed the override of a header key with multiples name, example Set-Cookie appears more than once.