Переглянути джерело

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 :^)
Maciej 3 роки тому
батько
коміт
933a717f3b
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      Userland/Libraries/LibCore/MimeData.cpp

+ 1 - 1
Userland/Libraries/LibCore/MimeData.cpp

@@ -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                                                                                                                \