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

Browser: Process Domain cookie attribute

This commit is contained in:
Timothy Flynn 2021-04-11 23:47:43 -04:00 committed by Andreas Kling
parent a554676008
commit 3d53af354e
2 changed files with 24 additions and 4 deletions

View file

@ -38,6 +38,7 @@ struct Cookie {
String name;
String value;
Core::DateTime expiry_time {};
String domain {};
};
class CookieJar {
@ -47,7 +48,7 @@ public:
private:
static Optional<String> canonicalize_domain(const URL& url);
static Optional<Cookie> parse_cookie(const String& cookie_string);
static Optional<Cookie> parse_cookie(const String& cookie_string, String default_domain);
static void parse_attributes(Cookie& cookie, StringView unparsed_attributes);
static void process_attribute(Cookie& cookie, StringView attribute_name, StringView attribute_value);
static void on_expires_attribute(Cookie& cookie, StringView attribute_value);