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 handling for cookies with the same name to DefaultCookieJar #6126

Merged
merged 3 commits into from
Mar 4, 2025

Conversation

suzuki764
Copy link
Contributor

@suzuki764 suzuki764 commented Feb 25, 2025

Motivation:

The DefaultCookieJar does not handle cases where cookies with the same name are set.

Modifications:

  • Added processing in accordance with RFC 6265:
    • Overwrites existing cookies when a cookie with the same name, domain, and path is set.
    • If the existing cookie has the HttpOnly flag set and the new cookie is created by a non-HTTP API, the new cookie is ignored.

Result:

@suzuki764 suzuki764 force-pushed the fix-default-cookie-jar branch from e926c82 to 6f3006b Compare March 3, 2025 15:16
Copy link
Contributor

@minwoox minwoox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for fixing this, @suzuki764! 😉

@minwoox minwoox added this to the 1.32.0 milestone Mar 4, 2025
@minwoox minwoox added the defect label Mar 4, 2025
minwoox and others added 2 commits March 4, 2025 19:25
…ookieJar.java

Co-authored-by: Ikhun Um <ih.pert@gmail.com>
@minwoox minwoox merged commit 950415a into line:main Mar 4, 2025
14 checks passed
@suzuki764
Copy link
Contributor Author

Thank you for the review and the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CookieClient appends cookies with the same name
4 participants