AK+Everywhere: Use Optional for URLParser::parse's base_url parameter

This commit is contained in:
networkException 2023-04-11 14:53:40 +02:00 committed by Linus Groh
parent 38bdf4d159
commit 9915fa72fb
Notes: sideshowbarker 2024-07-17 08:25:15 +09:00
12 changed files with 31 additions and 32 deletions

View file

@ -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 responses 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);