mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-09 18:16:09 +03:00
LibCore: Support the WebM file extension when determining MIME type
This enables, for example, navigating to a file:// URL in Ladybird with a .webm file extension.
This commit is contained in:
parent
63d2b26b17
commit
bcfa4a34a1
Notes:
sideshowbarker
2024-07-17 01:06:10 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/bcfa4a34a1 Pull-request: https://github.com/SerenityOS/serenity/pull/18859
@ -100,6 +100,8 @@ StringView guess_mime_type_based_on_filename(StringView path)
|
||||
return "text/csv"sv;
|
||||
if (path.ends_with(".sheets"sv, CaseSensitivity::CaseInsensitive))
|
||||
return "application/x-sheets+json"sv;
|
||||
if (path.ends_with(".webm"sv, CaseSensitivity::CaseInsensitive))
|
||||
return "video/webm"sv;
|
||||
// FIXME: Share this, TextEditor and HackStudio language detection somehow.
|
||||
auto basename = LexicalPath::basename(path);
|
||||
if (path.ends_with(".cpp"sv, CaseSensitivity::CaseInsensitive)
|
||||
|
Loading…
Reference in New Issue
Block a user