LibWeb/Fetch: Use MimeType in DataURL

This commit is contained in:
Jamie Mansfield 2024-06-02 17:34:46 +01:00 committed by Andreas Kling
parent 2b59ba19e0
commit 295c4ef51a
Notes: sideshowbarker 2024-07-17 09:37:30 +09:00
5 changed files with 21 additions and 19 deletions

View file

@ -301,11 +301,11 @@ void ResourceLoader::load(LoadRequest& request, SuccessCallback success_callback
auto data_url = data_url_or_error.release_value();
dbgln_if(SPAM_DEBUG, "ResourceLoader loading a data URL with mime-type: '{}', payload='{}'",
data_url.mime_type,
MUST(data_url.mime_type.serialized()),
StringView(data_url.body.bytes()));
HashMap<ByteString, ByteString, CaseInsensitiveStringTraits> response_headers;
response_headers.set("Content-Type", data_url.mime_type.to_byte_string());
response_headers.set("Content-Type", MUST(data_url.mime_type.serialized()).to_byte_string());
log_success(request);