Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Skip secure flag check on equals and hashCode generation.
My problem was that a server sent a set-cookie with "secure" and "HttpOnly" flags, then later after logout it sent a similar set-cookie without those flags.
The "SetCookieCache" java class then had it duplicated in the cookies Set (it should have replace the old one).
I wrote a PHP script to test how chrome handling this (i used https for the tests to be sure):
After the first iteration:
After the second iteration I got the result what I expected:
TL;DR
This commit fixes the duplicate cookie problem what happens when the following situation happens:
set-cookie: as=SOME_TOKEN_HERE; expires=Fri, 17-May-2019 16:17:01 GMT; path=/; secure; HttpOnly
set-cookie: as=; expires=Thu, 16-May-2019 16:12:02 GMT; path=/