Skip to content
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

Empty cookie values are not parsed #206

Closed
vlm opened this issue May 7, 2020 · 0 comments · Fixed by #208
Closed

Empty cookie values are not parsed #206

vlm opened this issue May 7, 2020 · 0 comments · Fixed by #208
Assignees
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@vlm
Copy link
Contributor

vlm commented May 7, 2020

The empty cookie value makes cookie unparsable, which precludes deleting values:

https://github.com/swift-server/async-http-client/blob/master/Sources/AsyncHTTPClient/HTTPClient%2BHTTPCookie.swift#L53

E.g. the Set-Cookie: cookieValue=; Path=/ won't be recognized as a valid HTTPClient.Cookie structure.

This violates https://tools.ietf.org/html/rfc6265#section-4.1.1 which requires empty cookies to be parsable.

One fix would be just to add a omittingEmptySubsequences: true to the split() call.

@weissi weissi added bug Something isn't working good first issue Good for newcomers labels May 7, 2020
@weissi weissi added this to the 1.2.0 milestone May 7, 2020
@weissi weissi changed the title [Bug] Empty cookie values are not parsed Empty cookie values are not parsed May 7, 2020
@artemredkin artemredkin self-assigned this May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants