Skip to content

public suffix list API #11

@pfernie

Description

@pfernie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions