LibCore: Make application/octet-stream the default guessed MIME type

This MIME type can be associated with every file, text/plain only with
plaintext files.

This makes browsers (e.g Firefox) properly displaying download progress
when downloading files in WebServer :^)
This commit is contained in:
Maciej 2022-03-18 19:02:25 +01:00 committed by Andreas Kling
parent c1ca009939
commit 933a717f3b
Notes: sideshowbarker 2024-07-17 17:05:37 +09:00

View file

@ -86,7 +86,7 @@ String guess_mime_type_based_on_filename(StringView path)
return "text/html"; return "text/html";
if (path.ends_with(".csv", CaseSensitivity::CaseInsensitive)) if (path.ends_with(".csv", CaseSensitivity::CaseInsensitive))
return "text/csv"; return "text/csv";
return "text/plain"; return "application/octet-stream";
} }
#define ENUMERATE_HEADER_CONTENTS \ #define ENUMERATE_HEADER_CONTENTS \