mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-29 22:42:52 +00:00
LibWeb: Make sure that fetch() response cookies get saved
We have to provide the Web::Page* in order for cookies to get saved.
This commit is contained in:
parent
667ac961b5
commit
db27499865
Notes:
sideshowbarker
2024-07-17 22:55:25 +09:00
Author: https://github.com/awesomekling
Commit: db27499865
Pull-request: https://github.com/SerenityOS/serenity/pull/17030
Reviewed-by: https://github.com/linusg ✅
1 changed files with 6 additions and 1 deletions
|
@ -1578,7 +1578,12 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> nonstandard_resource_load
|
|||
|
||||
auto request = fetch_params.request();
|
||||
|
||||
auto load_request = LoadRequest::create_for_url_on_page(request->current_url(), nullptr);
|
||||
Page* page = nullptr;
|
||||
auto& global_object = realm.global_object();
|
||||
if (is<HTML::Window>(global_object))
|
||||
page = static_cast<HTML::Window&>(global_object).page();
|
||||
|
||||
auto load_request = LoadRequest::create_for_url_on_page(request->current_url(), page);
|
||||
load_request.set_method(DeprecatedString::copy(request->method()));
|
||||
for (auto const& header : *request->header_list())
|
||||
load_request.set_header(DeprecatedString::copy(header.name), DeprecatedString::copy(header.value));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue