LibCore: Make `guess_mime_type_based_on_filename()' recognise CSV files
This commit is contained in:
parent
31523f6c64
commit
8066a623d9
Notes:
sideshowbarker
2024-07-19 01:16:32 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/8066a623d90 Pull-request: https://github.com/SerenityOS/serenity/pull/4149 Issue: https://github.com/SerenityOS/serenity/issues/4010 Issue: https://github.com/SerenityOS/serenity/issues/4136
1 changed files with 2 additions and 0 deletions
|
@ -94,6 +94,8 @@ String guess_mime_type_based_on_filename(const StringView& path)
|
|||
return "text/html";
|
||||
if (path.ends_with("/", CaseSensitivity::CaseInsensitive))
|
||||
return "text/html";
|
||||
if (path.ends_with(".csv", CaseSensitivity::CaseInsensitive))
|
||||
return "text/csv";
|
||||
return "text/plain";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue