Skip to content

fix: honor persistCookiesPerSession: false in HttpCrawler#3606

Open
barjin wants to merge 1 commit intofeat/session-reuse-in-basic-crawlerfrom
feat/better-cookie-handling
Open

fix: honor persistCookiesPerSession: false in HttpCrawler#3606
barjin wants to merge 1 commit intofeat/session-reuse-in-basic-crawlerfrom
feat/better-cookie-handling

Conversation

@barjin
Copy link
Copy Markdown
Member

@barjin barjin commented Apr 28, 2026

The flag had become a no-op after cookie handling moved into BaseHttpClient - response Set-Cookie headers were always written back into the session jar regardless of the flag's value.

Pass a per-request clone of the jar when the flag is off, so reads keep working, but writes are discarded.

This PR also adds several regression tests for cookie-related behaviour.

Together with the other Session-related fixes, this closes #3271 in v4.

The flag had become a no-op after cookie handling moved into
`BaseHttpClient`: response `Set-Cookie` headers were always written
back into the session jar regardless of the flag's value. Pass a
per-request clone of the jar when the flag is off so reads keep
working but writes are discarded.
@barjin barjin marked this pull request as ready for review April 28, 2026 09:57
@janbuchar janbuchar self-requested a review April 28, 2026 14:52
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.

2 participants