Add more mimetypes in infer_content_type
authorAndre Heinecke <aheinecke@intevation.de>
Thu, 13 Sep 2018 08:29:55 +0000 (10:29 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Thu, 13 Sep 2018 08:29:55 +0000 (10:29 +0200)
* src/mimemaker.cpp (infer_content_type): Add more mime types.

src/mimemaker.cpp

index 216acdf..7adb25b 100644 (file)
@@ -582,6 +582,11 @@ infer_content_type (const char * /*data*/, size_t /*datalen*/,
       { 1, "deb",   "application/x-debian-package" },
       { 1, "dl",    "video/dl" },
       { 1, "doc",   "application/msword" },
+      { 1, "docx",  "application/vnd.openxmlformats-officedocument.wordprocessingml.document" },
+      { 1, "dot",   "application/msword" },
+      { 1, "dotx",  "application/vnd.openxmlformats-officedocument.wordprocessingml.template" },
+      { 1, "docm",  "application/application/vnd.ms-word.document.macroEnabled.12" },
+      { 1, "dotm",  "application/vnd.ms-word.template.macroEnabled.12" },
       { 1, "dv",    "video/dv" },
       { 1, "dvi",   "application/x-dvi" },
       { 1, "eml",   "message/rfc822" },
@@ -640,6 +645,15 @@ infer_content_type (const char * /*data*/, size_t /*datalen*/,
       { 1, "png",   "image/png" },
       { 1, "pps",   "application/vnd.ms-powerpoint" },
       { 1, "ppt",   "application/vnd.ms-powerpoint" },
+      { 1, "pot",   "application/vnd.ms-powerpoint" },
+      { 1, "ppa",   "application/vnd.ms-powerpoint" },
+      { 1, "pptx",  "application/vnd.openxmlformats-officedocument.presentationml.presentation" },
+      { 1, "potx",  "application/vnd.openxmlformats-officedocument.presentationml.template" },
+      { 1, "ppsx",  "application/vnd.openxmlformats-officedocument.presentationml.slideshow" },
+      { 1, "ppam",  "application/vnd.ms-powerpoint.addin.macroEnabled.12" },
+      { 1, "pptm",  "application/vnd.ms-powerpoint.presentation.macroEnabled.12" },
+      { 1, "potm",  "application/vnd.ms-powerpoint.template.macroEnabled.12" },
+      { 1, "ppsm",  "application/vnd.ms-powerpoint.slideshow.macroEnabled.12" },
       { 1, "prf",   "application/pics-rules" },
       { 1, "ps",    "application/postscript" },
       { 1, "qt",    "video/quicktime" },
@@ -668,7 +682,14 @@ infer_content_type (const char * /*data*/, size_t /*datalen*/,
       { 0, "xhtml", "application/xhtml+xml" },
       { 1, "xlb",   "application/vnd.ms-excel" },
       { 1, "xls",   "application/vnd.ms-excel" },
+      { 1, "xlsx",  "application/vnd.ms-excel" },
       { 1, "xlt",   "application/vnd.ms-excel" },
+      { 1, "xla",   "application/vnd.ms-excel" },
+      { 1, "xltx",  "application/vnd.openxmlformats-officedocument.spreadsheetml.template" },
+      { 1, "xlsm",  "application/vnd.ms-excel.sheet.macroEnabled.12" },
+      { 1, "xltm",  "application/vnd.ms-excel.template.macroEnabled.12" },
+      { 1, "xlam",  "application/vnd.ms-excel.addin.macroEnabled.12" },
+      { 1, "xlsb",  "application/application/vnd.ms-excel.sheet.binary.macroEnabled.12" },
       { 0, "xml",   "application/xml" },
       { 0, "xsl",   "application/xml" },
       { 0, "xul",   "application/vnd.mozilla.xul+xml" },