Browse Source

Add some binary file mime types

Add executables, images and installers to MIME type list as application/octet-stream.
This will usually instruct a browser to download these file types to a local folder.
bel2125 4 years ago
parent
commit
2b1f4f125a
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/civetweb.c

+ 6 - 0
src/civetweb.c

@@ -8531,11 +8531,17 @@ static const struct {
     /* IANA registered MIME types
      * (http://www.iana.org/assignments/media-types)
      * application types */
+    {".bin", 4, "application/octet-stream"},
+    {".deb", 4, "application/octet-stream"},
+    {".dmg", 4, "application/octet-stream"},
+    {".dll", 4, "application/octet-stream"},
     {".doc", 4, "application/msword"},
     {".eps", 4, "application/postscript"},
     {".exe", 4, "application/octet-stream"},
+    {".iso", 4, "application/octet-stream"},
     {".js", 3, "application/javascript"},
     {".json", 5, "application/json"},
+    {".msi", 4, "application/octet-stream"},
     {".pdf", 4, "application/pdf"},
     {".ps", 3, "application/postscript"},
     {".rtf", 4, "application/rtf"},