浏览代码

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 年之前
父节点
当前提交
2b1f4f125a
共有 1 个文件被更改,包括 6 次插入0 次删除
  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"},