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

Add cookie assertion fails on single cookie deletion #48

Open
aabdellah opened this issue Nov 12, 2017 · 0 comments
Open

Add cookie assertion fails on single cookie deletion #48

aabdellah opened this issue Nov 12, 2017 · 0 comments

Comments

@aabdellah
Copy link

An HTTP server can instruct remote clients to remove a cookie by setting its value to an empty string.
When this happens this assertion fails:

`+ (void)addCookieToSharedCookiesStorage:(NSHTTPCookie *)cookie {
[[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookie:cookie];

#if DEBUG
NSHTTPCookie *readCookie = [[[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies] lastObject];
NSAssert(readCookie, @"cannot read any cookie after adding one");
#endif
}`

It shouldn't attempt to reread a cookie with an empty value.

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

No branches or pull requests

1 participant