mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 05:47:34 +00:00
Browser: Parse cookie attribute name-value pairs
Implements the remainder of the parsing algorithm of RFC-6265 Section 5.2 to extract optional attributes. The attribute values are not processed.
This commit is contained in:
parent
198c4fd7f2
commit
d610aeb5da
2 changed files with 111 additions and 3 deletions
|
@ -46,6 +46,14 @@ public:
|
|||
private:
|
||||
static Optional<String> canonicalize_domain(const URL& url);
|
||||
static Optional<Cookie> parse_cookie(const String& cookie_string);
|
||||
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);
|
||||
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);
|
||||
|
||||
HashMap<String, Vector<Cookie>> m_cookies;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue