mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-17 00:23:00 +00:00
AK+Everywhere: Use Optional for URLParser::parse's base_url parameter
This commit is contained in:
parent
38bdf4d159
commit
9915fa72fb
Notes:
sideshowbarker
2024-07-17 08:25:15 +09:00
Author: https://github.com/networkException
Commit: 9915fa72fb
Pull-request: https://github.com/SerenityOS/serenity/pull/18287
Reviewed-by: https://github.com/linusg
12 changed files with 31 additions and 32 deletions
|
@ -113,8 +113,7 @@ ErrorOr<Optional<AK::URL>> Response::location_url(Optional<String> const& reques
|
|||
return Optional<AK::URL> {};
|
||||
|
||||
// 3. If location is a header value, then set location to the result of parsing location with response’s URL.
|
||||
auto base_url = *url();
|
||||
auto location = AK::URLParser::parse(location_values.first(), &base_url);
|
||||
auto location = AK::URLParser::parse(location_values.first(), url());
|
||||
if (!location.is_valid())
|
||||
return Error::from_string_view("Invalid 'Location' header URL"sv);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue