1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:47:35 +00:00

Browser: Process Secure and HttpOnly cookie attributes

This commit is contained in:
Timothy Flynn 2021-04-11 23:49:33 -04:00 committed by Andreas Kling
parent db24186309
commit e0f9ed01c7
2 changed files with 10 additions and 6 deletions

View file

@ -40,6 +40,8 @@ struct Cookie {
Core::DateTime expiry_time {};
String domain {};
String path {};
bool secure { false };
bool http_only { false };
};
class CookieJar {
@ -57,8 +59,8 @@ private:
static void on_max_age_attribute(Cookie& cookie, StringView attribute_value);
static void on_domain_attribute(Cookie& cookie, StringView attribute_value);
static void on_path_attribute(Cookie& cookie, StringView attribute_value);
static void on_secure_attribute(Cookie& cookie, StringView attribute_value);
static void on_http_only_attribute(Cookie& cookie, StringView attribute_value);
static void on_secure_attribute(Cookie& cookie);
static void on_http_only_attribute(Cookie& cookie);
HashMap<String, Vector<Cookie>> m_cookies;
};