summaryrefslogtreecommitdiff
path: root/Userland/Services/WebServer
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2022-12-19 00:23:47 +0100
committerAndreas Kling <kling@serenityos.org>2022-12-20 10:34:19 +0100
commit25f2e4981c1236f69776c290fba7472ec7714869 (patch)
treebf46d80f5e93fe9590dc990082751c7b320fc9dd /Userland/Services/WebServer
parent99c1b634fc80c922ca4867e4eac83b73e4c28304 (diff)
downloadserenity-25f2e4981c1236f69776c290fba7472ec7714869.zip
AK: Stop using `DeprecatedString` in Base64 encoding
Diffstat (limited to 'Userland/Services/WebServer')
-rw-r--r--Userland/Services/WebServer/Client.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Services/WebServer/Client.cpp b/Userland/Services/WebServer/Client.cpp
index 2571f88684..84728f3c2c 100644
--- a/Userland/Services/WebServer/Client.cpp
+++ b/Userland/Services/WebServer/Client.cpp
@@ -238,7 +238,8 @@ static DeprecatedString folder_image_data()
static DeprecatedString cache;
if (cache.is_empty()) {
auto file = Core::MappedFile::map("/res/icons/16x16/filetype-folder.png"sv).release_value_but_fixme_should_propagate_errors();
- cache = encode_base64(file->bytes());
+ // FIXME: change to TRY() and make method fallible
+ cache = MUST(encode_base64(file->bytes())).to_deprecated_string();
}
return cache;
}
@@ -248,7 +249,8 @@ static DeprecatedString file_image_data()
static DeprecatedString cache;
if (cache.is_empty()) {
auto file = Core::MappedFile::map("/res/icons/16x16/filetype-unknown.png"sv).release_value_but_fixme_should_propagate_errors();
- cache = encode_base64(file->bytes());
+ // FIXME: change to TRY() and make method fallible
+ cache = MUST(encode_base64(file->bytes())).to_deprecated_string();
}
return cache;
}