LibURL: Make percent_encode return a String

This simplifies a bunch of places which were needing to error check and
convert from a ByteString to String.
This commit is contained in:
Shannon Booth 2024-08-10 13:12:19 +12:00 committed by Andreas Kling
commit 84a7fead0e
Notes: github-actions[bot] 2024-08-10 08:47:40 +00:00
9 changed files with 23 additions and 26 deletions

View file

@ -495,10 +495,10 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::open(String const& method_string, Stri
if (!parsed_url.host().has<Empty>()) {
// 1. If the username argument is not null, set the username given parsedURL and username.
if (username.has_value())
MUST(parsed_url.set_username(username.value()));
parsed_url.set_username(username.value());
// 2. If the password argument is not null, set the password given parsedURL and password.
if (password.has_value())
MUST(parsed_url.set_password(password.value()));
parsed_url.set_password(password.value());
}
// 9. If async is false, the current global object is a Window object, and either thiss timeout is