mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 22:59:33 +00:00
LibWeb: Complete the redirect URL before loading it
the "Location" header is allowed to be a relative URL (as is the case in our very own WebServer!)
This commit is contained in:
parent
8e8cbe6a12
commit
1df9293ea4
Notes:
sideshowbarker
2024-07-19 04:28:06 +09:00
Author: https://github.com/alimpfard
Commit: 1df9293ea4
Pull-request: https://github.com/SerenityOS/serenity/pull/2924
1 changed files with 1 additions and 1 deletions
|
@ -212,7 +212,7 @@ void FrameLoader::resource_did_load()
|
||||||
// FIXME: Also check HTTP status code before redirecting
|
// FIXME: Also check HTTP status code before redirecting
|
||||||
auto location = resource()->response_headers().get("Location");
|
auto location = resource()->response_headers().get("Location");
|
||||||
if (location.has_value()) {
|
if (location.has_value()) {
|
||||||
load(location.value(), FrameLoader::Type::Navigation);
|
load(url.complete_url(location.value()), FrameLoader::Type::Navigation);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue