Skip to content

Fixed bug with cookie handling #138

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

Merged
merged 2 commits into from
Nov 5, 2012
Merged

Fixed bug with cookie handling #138

merged 2 commits into from
Nov 5, 2012

Conversation

elFarto
Copy link
Contributor

@elFarto elFarto commented Sep 11, 2012

Added limit of 2 fields to split in parseCookie, to be able to handle cookies such as:
Set-Cookie: PREF=ID=a3be7e468f2a528c:FF=0:TM=1347369...

Added limit of 2 fields to split in parseCookie, to be able to handle cookies such as:
Set-Cookie: PREF=ID=a3be7e468f2a528c:FF=0:TM=1347369...
@jfarcand
Copy link
Contributor

Thanks. Can you attach a test case as well? That would be perfect :-)

@slandelle
Copy link
Contributor

Sorry to bump in, but are you sure that having an = character in a cookie value is valid?
Shouldn't it be URLencoded, ie %3D?

Try out:http://www.albionresearch.com/misc/urlencode.php

@elFarto
Copy link
Contributor Author

elFarto commented Sep 11, 2012

Well, I've looked around at various sources. Some suggest encoding, but say it's not required. From what I can see the value is just everything up to the ; or end of the string.

Plus that cookie I put in my original comment came from google.com, so it's probably best that it is supported.

I'll come up with a test case for it.

@slandelle
Copy link
Contributor

Well, it looks like it's definitively required by the RFCs, but internet is such a mess and nobody gives a damn...

@elFarto
Copy link
Contributor Author

elFarto commented Sep 11, 2012

Testcase added

@elFarto
Copy link
Contributor Author

elFarto commented Oct 12, 2012

Is there any plan to merge this?

@bootstraponline
Copy link

+1

jfarcand added a commit that referenced this pull request Nov 5, 2012
Fixed bug with cookie handling
@jfarcand jfarcand merged commit 09a14cd into AsyncHttpClient:master Nov 5, 2012
@slandelle
Copy link
Contributor

@jfarcand Could you backport this on the 1.7.x branch, please?

jfarcand added a commit that referenced this pull request Nov 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants