Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

public suffix list API #11

Open
pfernie opened this issue May 23, 2017 · 0 comments
Open

public suffix list API #11

pfernie opened this issue May 23, 2017 · 0 comments

Comments

@pfernie
Copy link
Owner

pfernie commented May 23, 2017

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.

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

No branches or pull requests

1 participant