mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
LibWeb: Store cookies sent via the Set-Cookie HTTP header
Note: HTTP response headers are currently stored in a hash map, so the Set-Cookie entry will only appear once here.
This commit is contained in:
parent
1ef48d50ff
commit
4152f807bc
1 changed files with 5 additions and 0 deletions
|
@ -274,6 +274,11 @@ void FrameLoader::resource_did_load()
|
|||
return;
|
||||
}
|
||||
|
||||
// FIXME: Support multiple instances of the Set-Cookie response header.
|
||||
auto set_cookie = resource()->response_headers().get("Set-Cookie");
|
||||
if (set_cookie.has_value())
|
||||
document->set_cookie(set_cookie.value());
|
||||
|
||||
if (!url.fragment().is_empty())
|
||||
frame().scroll_to_anchor(url.fragment());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue