From b172bf4f842081f33c06c675b353de07b3fbcbaf Mon Sep 17 00:00:00 2001 From: Maciej Date: Sat, 19 Mar 2022 18:01:37 +0100 Subject: [PATCH] LibCore: Add text/css mime type Firefox throws out css files with MIME type not being "text/css", so let's add it to make attached CSS working on WebServer. :^) --- Userland/Libraries/LibCore/MimeData.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibCore/MimeData.cpp b/Userland/Libraries/LibCore/MimeData.cpp index 75851ee01d..6e57cee162 100644 --- a/Userland/Libraries/LibCore/MimeData.cpp +++ b/Userland/Libraries/LibCore/MimeData.cpp @@ -75,6 +75,8 @@ String guess_mime_type_based_on_filename(StringView path) return "text/markdown"; if (path.ends_with(".html", CaseSensitivity::CaseInsensitive) || path.ends_with(".htm", CaseSensitivity::CaseInsensitive)) return "text/html"; + if (path.ends_with(".css", CaseSensitivity::CaseInsensitive)) + return "text/css"; if (path.ends_with(".js", CaseSensitivity::CaseInsensitive)) return "application/javascript"; if (path.ends_with(".json", CaseSensitivity::CaseInsensitive))