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

Browser: Process Path cookie attribute

This commit is contained in:
Timothy Flynn 2021-04-11 23:48:59 -04:00 committed by Andreas Kling
parent 3d53af354e
commit db24186309
2 changed files with 37 additions and 4 deletions

View file

@ -39,6 +39,7 @@ struct Cookie {
String value;
Core::DateTime expiry_time {};
String domain {};
String path {};
};
class CookieJar {
@ -48,7 +49,8 @@ public:
private:
static Optional<String> canonicalize_domain(const URL& url);
static Optional<Cookie> parse_cookie(const String& cookie_string, String default_domain);
static String default_path(const URL& url);
static Optional<Cookie> parse_cookie(const String& cookie_string, String default_domain, String default_path);
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);