From: Alexander Moisseev Date: Wed, 28 Feb 2018 13:28:26 +0000 (+0300) Subject: [Minor] Add some non-standard CTs to full_extensions_map X-Git-Tag: 1.7.0~101^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3b5d28d139e02af2938bc55d7113594234f719ce;p=rspamd.git [Minor] Add some non-standard CTs to full_extensions_map --- 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)