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

fix: remove cookies with max-age=0 from cookie store #2275

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

kettanaito
Copy link
Member

@kettanaito kettanaito commented Sep 10, 2024

Changes

  • Cookies with max-age=0 can never be set in the store.
  • Updating an existing cookie to max-age=0 (i.e. removing the cookie) now deletes that cookie instead of storing two entries of it (the root cause of the issue).

@kettanaito kettanaito marked this pull request as ready for review September 10, 2024 15:03
@kettanaito kettanaito changed the title test: add test for a mocked "max-age=0" cookie fix: remove cookies with max-age=0 from cookie store Sep 10, 2024
@kettanaito kettanaito merged commit c307ab2 into main Sep 10, 2024
12 checks passed
@kettanaito kettanaito deleted the fix/cookie-max-age-0 branch September 10, 2024 15:23
@kettanaito
Copy link
Member Author

Released: v2.4.5 🎉

This has been released in v2.4.5!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

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

Successfully merging this pull request may close these issues.

Mocked response cookie persists after sending max-age=0
1 participant