diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader/Resource.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Loader/Resource.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/Resource.cpp b/Userland/Libraries/LibWeb/Loader/Resource.cpp index 7f6cdcaa1c..71ef8cf9a0 100644 --- a/Userland/Libraries/LibWeb/Loader/Resource.cpp +++ b/Userland/Libraries/LibWeb/Loader/Resource.cpp @@ -103,7 +103,7 @@ void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, HashMap<Depre // FIXME: "The Quite OK Image Format" doesn't have an official mime type yet, // and servers like nginx will send a generic octet-stream mime type instead. // Let's use image/x-qoi for now, which is also what our Core::MimeData uses & would guess. - if (m_mime_type == "application/octet-stream" && url().path().ends_with(".qoi"sv)) + if (m_mime_type == "application/octet-stream" && url().serialize_path().ends_with(".qoi"sv)) m_mime_type = "image/x-qoi"; } else if (url().scheme() == "data" && !url().data_mime_type().is_empty()) { dbgln_if(RESOURCE_DEBUG, "This is a data URL with mime-type _{}_", url().data_mime_type()); @@ -113,7 +113,7 @@ void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, HashMap<Depre if (content_type_options.value_or("").equals_ignoring_ascii_case("nosniff"sv)) { m_mime_type = "text/plain"; } else { - m_mime_type = Core::guess_mime_type_based_on_filename(url().path()); + m_mime_type = Core::guess_mime_type_based_on_filename(url().serialize_path()); } } |