aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-02-28 14:29:52 +0000
committerGitHub <noreply@github.com>2018-02-28 14:29:52 +0000
commitf76cc6efb4e7b95035d791676a91bcc6a31ef5f9 (patch)
treeebe6de70fa3190071c9073dcb6238d10279f545d
parent1b7a045c0643ad0dbea760d4a6296fff539606f6 (diff)
parent3b5d28d139e02af2938bc55d7113594234f719ce (diff)
downloadrspamd-f76cc6efb4e7b95035d791676a91bcc6a31ef5f9.tar.gz
rspamd-f76cc6efb4e7b95035d791676a91bcc6a31ef5f9.zip
Merge pull request #2040 from moisseev/mime-types
[Minor] Add some non-standard CTs to full_extensions_map
-rw-r--r--src/plugins/lua/mime_types.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua
index 27dbfc89c..6c4ceec73 100644
--- a/src/plugins/lua/mime_types.lua
+++ b/src/plugins/lua/mime_types.lua
@@ -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)