mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +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
Notes:
sideshowbarker
2024-07-18 20:30:55 +09:00
Author: https://github.com/trflynn89
Commit: 4152f807bc
Pull-request: https://github.com/SerenityOS/serenity/pull/6240
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