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:
parent
c1ca009939
commit
933a717f3b
Notes:
sideshowbarker
2024-07-17 17:05:37 +09:00
Author: https://github.com/sppmacd Commit: https://github.com/SerenityOS/serenity/commit/933a717f3b Pull-request: https://github.com/SerenityOS/serenity/pull/13119
1 changed files with 1 additions and 1 deletions
|
@ -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 \
|
||||||
|
|
Loading…
Add table
Reference in a new issue