mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 22:42:08 +00:00
AK: Stop using DeprecatedString
in Base64 encoding
This commit is contained in:
parent
99c1b634fc
commit
25f2e4981c
14 changed files with 47 additions and 27 deletions
|
@ -1305,7 +1305,8 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> http_network_or_cache_fet
|
|||
// true, set authorizationValue to httpRequest’s current URL, converted to an `Authorization` value.
|
||||
else if (http_request->current_url().includes_credentials() && is_authentication_fetch == IsAuthenticationFetch::Yes) {
|
||||
auto const& url = http_request->current_url();
|
||||
authorization_value = encode_base64(DeprecatedString::formatted("{}:{}", url.username(), url.password()).bytes());
|
||||
auto payload = DeprecatedString::formatted("{}:{}", url.username(), url.password());
|
||||
authorization_value = TRY_OR_RETURN_OOM(realm, encode_base64(payload.bytes())).to_deprecated_string();
|
||||
}
|
||||
|
||||
// 4. If authorizationValue is non-null, then append (`Authorization`, authorizationValue) to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue