Repository navigation
[PR #13930/b1f6c87b backport][3.14] Add limits for client cookie handling - #13942
Conversation
Co-authored-by: iamibi <[email protected]> (cherry picked from commit b1f6c87)
Automation signalsActivity patterns show signs of automation. Evidence
Last 5 PRs:
This is an automated analysis by AgentScan |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 3.14 #13942 +/- ##
==========================================
+ Coverage 96.38% 96.46% +0.07%
==========================================
Files 161 161
Lines 53348 54268 +920
Branches 2888 2957 +69
==========================================
+ Hits 51421 52351 +930
+ Misses 1750 1743 -7
+ Partials 177 174 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Merging this PR will not alter performance
Comparing Footnotes
|
|
This is a backport of PR #13930 as merged into master (b1f6c87).
What do these changes do?
Add limits to client cookie handling. Each
Set-Cookiefield now produces exactly one cookie, as browsers do, andCookieJarcaps how many cookies it stores and how large aCookieheader it builds. Eviction follows Firefox, so expired and non secure cookies go first, least recently used first.Are there changes in behavior for the user?
The jar applies these limits:
Set-Cookiefields per response, 32 attributes per field;Cookierequest header.Extra
name=valuepairs after the first one in aSet-Cookiefield are now ignored instead of becoming separate cookies; see the breaking fragment. Cookies passed withcookies=and an explicitCookieheader are not limited.Is it a substantial burden for the maintainers to support this?
No, the limits are private constants and there is no new public API.
Related issue number
N/A
Checklist
CONTRIBUTORS.txtCHANGES/foldername it
<issue_or_pr_num>.<type>.rst(e.g.588.bugfix.rst)if you don't have an issue number, change it to the pull request
number after creating the PR
.bugfix: A bug fix for something the maintainers deemed animproper undesired behavior that got corrected to match
pre-agreed expectations.
.feature: A new behavior, public APIs. That sort of stuff..deprecation: A declaration of future API removals and breakingchanges in behavior.
.breaking: When something public is removed in a breaking way.Could be deprecated in an earlier release.
.doc: Notable updates to the documentation structure or buildprocess.
.packaging: Notes for downstreams about unobvious side effectsand tooling. Changes in the test invocation considerations and
runtime assumptions.
.contrib: Stuff that affects the contributor experience. e.g.Running tests, building the docs, setting up the development
environment.
.misc: Changes that are hard to assign to any of the abovecategories.
Make sure to use full sentences with correct case and punctuation,
for example:
Use the past tense or the present tense a non-imperative mood,
referring to what's changed compared to the last released version
of this project.
Local test run
Drafted with Claude Opus 5.5; reviewed by @bdraco.