Skip to content

Empty cookie values are not parsed #206

Closed
@vlm

Description

@vlm

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.

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomerskind/bugFeature doesn't work as expected.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions