mirror of
https://github.com/servo/servo
synced 2026-05-13 10:27:03 +02:00
CookieStorage has been refactored to use HashMap with base domain as the key. Values of hashmap is vector of cookies. CookieStorage now has max_per_host which restricts maximum cookies that can be added per base domain. Cookie eviction doesnot take place if max_per_host is not reached. Cookie eviction logic implemented here does following steps 1) Evict all expired cookies 2) Remove oldest accessed non-secure cookie If any 3) When no non-secure cookie exist, remove oldest accessed secure cookie if new cookie being added is secure. Else ignore new cookie