mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +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:
committed by
Andreas Kling
parent
1ef48d50ff
commit
4152f807bc
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user