[PATCH] Added OpenDocument Format/ISO 26300 file formats to mime.types
Maxim Dounin
mdounin at mdounin.ru
Tue Sep 5 17:09:23 UTC 2017
Hello!
On Mon, Sep 04, 2017 at 11:59:48PM +0200, Michiel Leenaars wrote:
> # HG changeset patch
> # User Michiel Leenaars <ml.software at leenaa.rs>
> # Date 1504562357 -7200
> # Mon Sep 04 23:59:17 2017 +0200
> # Node ID b31eb2901b627733dd3d9aaa07ce8071aa7c5dad
> # Parent c7d4017c8876af6d8570e400320537d7d39e9578
> Added OpenDocument Format/ISO 26300 file formats to mime.types
Style: there should be a relevant prefix here, and a dot after the
sentence. For example:
changeset: 5337:07ef29f69a54
user: Sergey Kandaurov <pluknet at nginx.com>
date: Fri Aug 23 16:24:24 2013 +0400
summary: MIME: added the most common OOXML MIME types (ticket #243).
>
> ODF is the official document file format used by a number of
> governments, NATO, as well as by hundreds of millions of users. It is
> an international 'de jure' standard, including the file extensions and
> associated mimetypes, which is the default file format of Apache Open
> Office, LibreOffice, Calligra, NeoOffice (open source office
> applications), as well as Collabio, Lotus Symphony and (at least in
> Europe) of Microsoft Office - you can choose between the OOXML formats
> and ODF upon install. These file format replace the legacy office file
> formats such as .doc, .wpd and .xls.
>
> Apache have had support for exact same mimetypes in their mimetype catalog for
> quite a number of years, as do several other web server such as Lighttpd:
>
> https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
> http://redmine.lighttpd.net/projects/1/wiki/mimetype_assigndetails
>
> The most common use case is a site putting up presentations or documents, or
> migrating away from one of the servers that supports these mimetypes. Other
> document file formats
Just a side note: this seems to be misedited.
>
> diff -r c7d4017c8876 -r b31eb2901b62 conf/mime.types
> --- a/conf/mime.types Tue Aug 22 21:22:59 2017 +0300
> +++ b/conf/mime.types Mon Sep 04 23:59:17 2017 +0200
> @@ -68,6 +68,21 @@
> application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
> application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
>
> + application/vnd.oasis.opendocument.text odt;
Style: first character of the column should be aligned with other
entries, not the last one. Also, it probably make sense to
re-format existing OOXML types to avoid lines longer than 80
chars, and place them into normal position in the application/
section, see patch below.
> + application/vnd.oasis.opendocument.text-template ott;
> + application/vnd.oasis.opendocument.text-web oth;
> + application/vnd.oasis.opendocument.text-master odm;
> + application/vnd.oasis.opendocument.graphics odg;
> + application/vnd.oasis.opendocument.graphics-template otg;
> + application/vnd.oasis.opendocument.presentation odp;
> + application/vnd.oasis.opendocument.presentation-template otp;
> + application/vnd.oasis.opendocument.spreadsheet ods;
> + application/vnd.oasis.opendocument.spreadsheet-template ots;
> + application/vnd.oasis.opendocument.chart odc;
> + application/vnd.oasis.opendocument.formula odf;
> + application/vnd.oasis.opendocument.database odb;
> + application/vnd.oasis.opendocument.image odi;
> +
> audio/midi mid midi kar;
> audio/mpeg mp3;
> audio/ogg ogg;
Sorry, but no. As per the policy explained in the previous
message, we certainly do not need all these extensions here. Most
of them are never seen even by users of OpenOffice / LibreOffice.
Not to mention that there should be no problem with serving them
as application/octet-stream.
We can consider adding most common of them - e.g., odt/odp/ods
(and may be odg, as Wikipedia lists it among the "most common file
extensions used for OpenDocument documents" [1]), similar to what
we do with OOXML. Patch below. The patch is rather big due to
whitespace changes, without them it is as simple as:
application/vnd.ms-excel xls;
application/vnd.ms-fontobject eot;
application/vnd.ms-powerpoint ppt;
+ application/vnd.oasis.opendocument.graphics odg;
+ application/vnd.oasis.opendocument.presentation odp;
+ application/vnd.oasis.opendocument.spreadsheet ods;
+ application/vnd.oasis.opendocument.text odt;
application/vnd.openxmlformats-officedocument.presentationml.presentation
pptx;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
[1] https://en.wikipedia.org/wiki/OpenDocument_technical_specification#Documents
# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1504629059 -10800
# Tue Sep 05 19:30:59 2017 +0300
# Node ID baa422a3b8db371afe97d8734f858cae8076cf29
# Parent 6b6e15bbda9269d03d66130efd51921dfedd93cb
MIME: style.
Restored alphabetical order within groups, OOXML types placed to
the application/ group and wrapped to avoid lines longer than 80 chars.
diff --git a/conf/mime.types b/conf/mime.types
--- a/conf/mime.types
+++ b/conf/mime.types
@@ -16,13 +16,13 @@ types {
text/x-component htc;
image/png png;
+ image/svg+xml svg svgz;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
+ image/webp webp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
- image/svg+xml svg svgz;
- image/webp webp;
application/font-woff woff;
application/java-archive jar war ear;
@@ -33,12 +33,18 @@ types {
application/postscript ps eps ai;
application/rtf rtf;
application/vnd.apple.mpegurl m3u8;
+ application/vnd.google-earth.kml+xml kml;
+ application/vnd.google-earth.kmz kmz;
application/vnd.ms-excel xls;
application/vnd.ms-fontobject eot;
application/vnd.ms-powerpoint ppt;
+ application/vnd.openxmlformats-officedocument.presentationml.presentation
+ pptx;
+ application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ xlsx;
+ application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ docx;
application/vnd.wap.wmlc wmlc;
- application/vnd.google-earth.kml+xml kml;
- application/vnd.google-earth.kmz kmz;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
@@ -64,10 +70,6 @@ types {
application/octet-stream iso img;
application/octet-stream msi msp msm;
- application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
- application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
-
audio/midi mid midi kar;
audio/mpeg mp3;
audio/ogg ogg;
# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1504630934 -10800
# Tue Sep 05 20:02:14 2017 +0300
# Node ID 97e138ddbfcb476f583d95ea74ff0eb27e81478a
# Parent baa422a3b8db371afe97d8734f858cae8076cf29
MIME: added most common OpenDocument types.
Requested by Michiel Leenaars.
diff --git a/conf/mime.types b/conf/mime.types
--- a/conf/mime.types
+++ b/conf/mime.types
@@ -1,91 +1,95 @@
types {
- text/html html htm shtml;
- text/css css;
- text/xml xml;
- image/gif gif;
- image/jpeg jpeg jpg;
- application/javascript js;
- application/atom+xml atom;
- application/rss+xml rss;
+ text/html html htm shtml;
+ text/css css;
+ text/xml xml;
+ image/gif gif;
+ image/jpeg jpeg jpg;
+ application/javascript js;
+ application/atom+xml atom;
+ application/rss+xml rss;
- text/mathml mml;
- text/plain txt;
- text/vnd.sun.j2me.app-descriptor jad;
- text/vnd.wap.wml wml;
- text/x-component htc;
+ text/mathml mml;
+ text/plain txt;
+ text/vnd.sun.j2me.app-descriptor jad;
+ text/vnd.wap.wml wml;
+ text/x-component htc;
- image/png png;
- image/svg+xml svg svgz;
- image/tiff tif tiff;
- image/vnd.wap.wbmp wbmp;
- image/webp webp;
- image/x-icon ico;
- image/x-jng jng;
- image/x-ms-bmp bmp;
+ image/png png;
+ image/svg+xml svg svgz;
+ image/tiff tif tiff;
+ image/vnd.wap.wbmp wbmp;
+ image/webp webp;
+ image/x-icon ico;
+ image/x-jng jng;
+ image/x-ms-bmp bmp;
- application/font-woff woff;
- application/java-archive jar war ear;
- application/json json;
- application/mac-binhex40 hqx;
- application/msword doc;
- application/pdf pdf;
- application/postscript ps eps ai;
- application/rtf rtf;
- application/vnd.apple.mpegurl m3u8;
- application/vnd.google-earth.kml+xml kml;
- application/vnd.google-earth.kmz kmz;
- application/vnd.ms-excel xls;
- application/vnd.ms-fontobject eot;
- application/vnd.ms-powerpoint ppt;
+ application/font-woff woff;
+ application/java-archive jar war ear;
+ application/json json;
+ application/mac-binhex40 hqx;
+ application/msword doc;
+ application/pdf pdf;
+ application/postscript ps eps ai;
+ application/rtf rtf;
+ application/vnd.apple.mpegurl m3u8;
+ application/vnd.google-earth.kml+xml kml;
+ application/vnd.google-earth.kmz kmz;
+ application/vnd.ms-excel xls;
+ application/vnd.ms-fontobject eot;
+ application/vnd.ms-powerpoint ppt;
+ application/vnd.oasis.opendocument.graphics odg;
+ application/vnd.oasis.opendocument.presentation odp;
+ application/vnd.oasis.opendocument.spreadsheet ods;
+ application/vnd.oasis.opendocument.text odt;
application/vnd.openxmlformats-officedocument.presentationml.presentation
- pptx;
+ pptx;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
- xlsx;
+ xlsx;
application/vnd.openxmlformats-officedocument.wordprocessingml.document
- docx;
- application/vnd.wap.wmlc wmlc;
- application/x-7z-compressed 7z;
- application/x-cocoa cco;
- application/x-java-archive-diff jardiff;
- application/x-java-jnlp-file jnlp;
- application/x-makeself run;
- application/x-perl pl pm;
- application/x-pilot prc pdb;
- application/x-rar-compressed rar;
- application/x-redhat-package-manager rpm;
- application/x-sea sea;
- application/x-shockwave-flash swf;
- application/x-stuffit sit;
- application/x-tcl tcl tk;
- application/x-x509-ca-cert der pem crt;
- application/x-xpinstall xpi;
- application/xhtml+xml xhtml;
- application/xspf+xml xspf;
- application/zip zip;
+ docx;
+ application/vnd.wap.wmlc wmlc;
+ application/x-7z-compressed 7z;
+ application/x-cocoa cco;
+ application/x-java-archive-diff jardiff;
+ application/x-java-jnlp-file jnlp;
+ application/x-makeself run;
+ application/x-perl pl pm;
+ application/x-pilot prc pdb;
+ application/x-rar-compressed rar;
+ application/x-redhat-package-manager rpm;
+ application/x-sea sea;
+ application/x-shockwave-flash swf;
+ application/x-stuffit sit;
+ application/x-tcl tcl tk;
+ application/x-x509-ca-cert der pem crt;
+ application/x-xpinstall xpi;
+ application/xhtml+xml xhtml;
+ application/xspf+xml xspf;
+ application/zip zip;
- application/octet-stream bin exe dll;
- application/octet-stream deb;
- application/octet-stream dmg;
- application/octet-stream iso img;
- application/octet-stream msi msp msm;
+ application/octet-stream bin exe dll;
+ application/octet-stream deb;
+ application/octet-stream dmg;
+ application/octet-stream iso img;
+ application/octet-stream msi msp msm;
- audio/midi mid midi kar;
- audio/mpeg mp3;
- audio/ogg ogg;
- audio/x-m4a m4a;
- audio/x-realaudio ra;
+ audio/midi mid midi kar;
+ audio/mpeg mp3;
+ audio/ogg ogg;
+ audio/x-m4a m4a;
+ audio/x-realaudio ra;
- video/3gpp 3gpp 3gp;
- video/mp2t ts;
- video/mp4 mp4;
- video/mpeg mpeg mpg;
- video/quicktime mov;
- video/webm webm;
- video/x-flv flv;
- video/x-m4v m4v;
- video/x-mng mng;
- video/x-ms-asf asx asf;
- video/x-ms-wmv wmv;
- video/x-msvideo avi;
+ video/3gpp 3gpp 3gp;
+ video/mp2t ts;
+ video/mp4 mp4;
+ video/mpeg mpeg mpg;
+ video/quicktime mov;
+ video/webm webm;
+ video/x-flv flv;
+ video/x-m4v m4v;
+ video/x-mng mng;
+ video/x-ms-asf asx asf;
+ video/x-ms-wmv wmv;
+ video/x-msvideo avi;
}
--
Maxim Dounin
http://nginx.org/
More information about the nginx-devel
mailing list