LibCore: Make `guess_mime_type_based_on_filename()' recognise CSV files

This commit is contained in:
AnotherTest
2020-11-23 16:16:27 +03:30
committed by Andreas Kling
parent 31523f6c64
commit 8066a623d9

View File

@@ -94,6 +94,8 @@ String guess_mime_type_based_on_filename(const StringView& path)
return "text/html"; return "text/html";
if (path.ends_with("/", CaseSensitivity::CaseInsensitive)) if (path.ends_with("/", CaseSensitivity::CaseInsensitive))
return "text/html"; return "text/html";
if (path.ends_with(".csv", CaseSensitivity::CaseInsensitive))
return "text/csv";
return "text/plain"; return "text/plain";
} }