Skip to content

Return the removed cookies and persist RemoveAllCookies - #64

Merged
FlorianRappl merged 2 commits into
AngleSharp:develfrom
michaelthyregod:fix/remove-cookies-result
Nov 9, 2026
Merged

FlorianRappl merged 2 commits into
AngleSharp:develfrom
michaelthyregod:fix/remove-cookies-result

Conversation

@michaelthyregod

Copy link
Copy Markdown
Contributor

RemoveCookies returned the lazy FindCookies query, which was evaluated after the removal and was therefore always empty. RemoveAllCookies didn't write the cookie file, so a persistent provider got the cookies back on the next start.

  • Change: RemoveCookies takes the matches before removing them; RemoveAllCookies writes the file like RemoveCookie and RemoveCookies already do.
  • Behaviour: both now do what their documentation says; no API change.

Tests: RemoveCookies returns the 5 removed cookies, and a provider reloaded after RemoveAllCookies is empty.

🤖 Generated with Claude Code

RemoveCookies returned the lazy FindCookies query, which was evaluated after
the removal and was therefore always empty. RemoveAllCookies did not write the
cookie file, so a persistent provider got the cookies back on the next start.
Comment thread CHANGELOG.md Resolved
@FlorianRappl FlorianRappl added this to the v1.3.1 milestone Nov 8, 2026

@FlorianRappl FlorianRappl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@FlorianRappl
FlorianRappl merged commit 1e6d809 into AngleSharp:devel Nov 9, 2026
5 checks passed
@michaelthyregod
michaelthyregod deleted the fix/remove-cookies-result branch November 15, 2026 07:28
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.

2 participants