1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 14:47:34 +00:00

Browser: Implement spec-compliant cookie retrieval

https://tools.ietf.org/html/rfc6265#section-5.4
This commit is contained in:
Timothy Flynn 2021-04-14 10:18:13 -04:00 committed by Andreas Kling
parent 82c53178fa
commit 5c6aa408ed
2 changed files with 81 additions and 6 deletions

View file

@ -53,9 +53,11 @@ public:
private:
static Optional<String> canonicalize_domain(const URL& url);
static bool domain_matches(const String& string, const String& domain_string);
static bool path_matches(const String& request_path, const String& cookie_path);
static String default_path(const URL& url);
void store_cookie(Web::Cookie::ParsedCookie& parsed_cookie, const URL& url, String canonicalized_domain, Web::Cookie::Source source);
Vector<Web::Cookie::Cookie*> get_matching_cookies(const URL& url, const String& canonicalized_domain, Web::Cookie::Source source);
void purge_expired_cookies();
HashMap<CookieStorageKey, Web::Cookie::Cookie> m_cookies;