]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add some non-standard CTs to full_extensions_map 2040/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Wed, 28 Feb 2018 13:28:26 +0000 (16:28 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Wed, 28 Feb 2018 13:28:26 +0000 (16:28 +0300)
src/plugins/lua/mime_types.lua

index 27dbfc89c7b189ec32c99fd4c22da1b998e8d28c..6c4ceec73fc69da6efdb0662f4c95c02a9fd2265 100644 (file)
@@ -308,7 +308,7 @@ local full_extensions_map = {
   {"dlm", "text/dlm"},
   {"doc", "application/msword"},
   {"docm", "application/vnd.ms-word.document.macroEnabled.12"},
-  {"docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"},
+  {"docx", {"application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/msword"}},
   {"dot", "application/msword"},
   {"dotm", "application/vnd.ms-word.template.macroEnabled.12"},
   {"dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"},
@@ -430,7 +430,7 @@ local full_extensions_map = {
   {"m2v", "video/mpeg"},
   {"m3u", "audio/x-mpegurl"},
   {"m3u8", "audio/x-mpegurl"},
-  {"m4a", "audio/m4a"},
+  {"m4a", {"audio/m4a", "audio/x-m4a"}},
   {"m4b", "audio/m4b"},
   {"m4p", "audio/m4p"},
   {"m4r", "audio/x-m4r"},
@@ -584,7 +584,7 @@ local full_extensions_map = {
   {"qxd", "application/octet-stream"},
   {"ra", "audio/x-pn-realaudio"},
   {"ram", "audio/x-pn-realaudio"},
-  {"rar", "application/x-rar-compressed"},
+  {"rar", {"application/x-rar-compressed", "application/octet-stream"}},
   {"ras", "image/x-cmu-raster"},
   {"rat", "application/rat-file"},
   {"rc", "text/plain"},
@@ -773,15 +773,15 @@ local full_extensions_map = {
   {"xlk", "application/vnd.ms-excel"},
   {"xll", "application/vnd.ms-excel"},
   {"xlm", "application/vnd.ms-excel"},
-  {"xls", "application/vnd.ms-excel"},
+  {"xls", {"application/vnd.ms-excel", "application/vnd.ms-office", "application/x-excel", "application/octet-stream"}},
   {"xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12"},
   {"xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"},
-  {"xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},
+  {"xlsx", {"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/octet-stream"}},
   {"xlt", "application/vnd.ms-excel"},
   {"xltm", "application/vnd.ms-excel.template.macroEnabled.12"},
   {"xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"},
   {"xlw", "application/vnd.ms-excel"},
-  {"xml", {"application/xml", "text/xml"}},
+  {"xml", {"application/xml", "text/xml", "application/octet-stream"}},
   {"xmp", "application/octet-stream" },
   {"xmta", "application/xml"},
   {"xof", "x-world/x-vrml"},
@@ -800,7 +800,7 @@ local full_extensions_map = {
   {"xtp", "application/octet-stream"},
   {"xwd", "image/x-xwindowdump"},
   {"z", "application/x-compress"},
-  {"zip", "application/zip"},
+  {"zip", {"application/zip", "application/x-zip-compressed", "application/octet-stream"}},
 }
 
 local function check_mime_type(task)