Skip to content

Remove deprecated legacy cookie format support#2215

Merged
mre merged 1 commit into
masterfrom
remove-legacy-cookie-format
May 30, 2026
Merged

Remove deprecated legacy cookie format support#2215
mre merged 1 commit into
masterfrom
remove-legacy-cookie-format

Conversation

@mre

@mre mre commented May 30, 2026

Copy link
Copy Markdown
Member

Follow-up to #2208 (review comment by @thomas-zahner) and closes #2213.

CookieJar::load previously fell back to the legacy cookie store format via the deprecated ReqwestCookieStore::load_json. The new cookie_store::serde::json format has been the default for almost 2 years, so this drops support for the old format and the associated #[allow(deprecated)].

@mre mre force-pushed the remove-legacy-cookie-format branch 2 times, most recently from 24db5bf to e7a0760 Compare May 30, 2026 14:45
Drop the legacy-format fallback in CookieJar::load that relied on the
deprecated ReqwestCookieStore::load_json. The cookie_store::serde::json
format has been the default for nearly two years.

Empty cookie jar files (e.g. created via touch) are still loaded
gracefully as an empty store, matching the previous behavior, and
unit tests cover the missing-file, empty-file, and new-format cases.

Closes #2213
@mre mre force-pushed the remove-legacy-cookie-format branch from e7a0760 to 2c22b04 Compare May 30, 2026 14:51
@mre

mre commented May 30, 2026

Copy link
Copy Markdown
Member Author

I noticed that the removed legacy fallback used to silently handle empty files.
I've updated the code to make sure that will continue to be the case. So a touch cookies.json workflow (which the caching docs recommend for Docker) doesn't break.

Comment thread lychee-lib/src/types/cookies.rs

@thomas-zahner thomas-zahner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Awesome 🚀

@mre mre merged commit 73c5e21 into master May 30, 2026
8 checks passed
@mre mre deleted the remove-legacy-cookie-format branch May 30, 2026 20:31
@mre mre mentioned this pull request May 30, 2026
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.

Remove deprecated legacy cookie format support

2 participants