-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Currently, support for public suffix handling is implemented as providing a builder-style CookieStore::with_suffix_list. This is probably fine; in cases where e.g. a user wants to use a cache (psl crate), they may do so outside of user_agent and use the builder method.
For the case of de/serializing a CookieStore, however, should we indicate/enforce that a stored CookieStore previously utilized a public suffix list? That is, they create a CookieStore and specify a public suffix list, and serialize it to disk. Should we then enforce that the deserialization of that CookieStore must be accompanied by a public suffix list again?
Rather than store the provided public suffix list, I think it would make more sense to simply indicate whether the serialized store had a list (bool flag), and change load() to take an Option<publicsuffix::List>. If the deserialized store's list flag is true, and the provided Option<_> is None, return an error.