Skip to content

perf(goto): reuse cookie jar while parsing headers#660

Merged
Kikobeats merged 1 commit intomasterfrom
codex/fix-cookie-parse-allocation
Feb 26, 2026
Merged

perf(goto): reuse cookie jar while parsing headers#660
Kikobeats merged 1 commit intomasterfrom
codex/fix-cookie-parse-allocation

Conversation

@Kikobeats
Copy link
Member

@Kikobeats Kikobeats commented Feb 26, 2026

Note

Low Risk
Low risk: small, localized change to cookie parsing that mainly affects performance and cookie-header edge cases; behavior changes are covered by a new unit test.

Overview
parseCookies now reuses a single tough-cookie CookieJar per cookie header and parses cookies via the returned cookie object (toJSON()), skipping entries that fail to set.

Adds a unit test that monkeypatches tough-cookie to assert only one CookieJar is constructed during parsing.

Written by Cursor Bugbot for commit 3e7bedf. This will update automatically on new commits. Configure here.

@Kikobeats Kikobeats merged commit f9d4654 into master Feb 26, 2026
20 of 21 checks passed
@Kikobeats Kikobeats deleted the codex/fix-cookie-parse-allocation branch February 26, 2026 16:49
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.

1 participant