Hello!

On Sat, Jul 26, 2025 at 08:48:51PM +0300, Lafiel via nginx-devel wrote:

> Can you review latest patch?

See below, and sorry for the long delay.  Please don't hesitate to 
ping if review takes longer than a couple of weeks.

> # HG changeset patch
> # User Yuriy Izorkin <laf...@elven.pw>
> # Date 1725538155 -10800
> #      Thu Sep 05 15:09:15 2024 +0300
> # Node ID bf8d1f3fadf34195d26757b3ec1c004b2142842b
> # Parent  dbf76fdd109fbbba40a7c5299cc277d180f4bbad
> MIME: updated type for pdb and prc files.
> 
> Updated type for .pdb and .prcfiles to application/vnd.palm in

Nitpicking: missing space in ".prcfiles".

> accordance with IANA [1].
> 
> Not added .pqa and .oprc extensions, since they are currently
> not used.
> 
> Link for reference:
> 
> https://www.iana.org/assignments/media-types/application/vnd.palm
> 
> diff -r dbf76fdd109f -r bf8d1f3fadf3 conf/mime.types
> --- a/conf/mime.types   Tue Sep 03 13:11:25 2024 +0300
> +++ b/conf/mime.types   Thu Sep 05 15:09:15 2024 +0300
> @@ -53,6 +53,7 @@
>                                                       xlsx;
>      application/vnd.openxmlformats-officedocument.wordprocessingml.document
>                                                       docx;
> +    application/vnd.palm                             pdb prc;
>      application/vnd.rar                              rar;
>      application/vnd.wap.wmlc                         wmlc;
>      application/wasm                                 wasm;
> @@ -62,7 +63,6 @@
>      application/x-java-jnlp-file                     jnlp;
>      application/x-makeself                           run;
>      application/x-perl                               pl pm;
> -    application/x-pilot                              prc pdb;
>      application/x-redhat-package-manager             rpm;
>      application/x-sea                                sea;
>      application/x-shockwave-flash                    swf;

Does it make sense to use these extensions nowadays?

If yes, how the consumers of these formats will react to the 
change - that is, is the "application/vnd.palm" type actually 
supported, or it's just a planned change which never happened in 
practice?

Note that Apache uses "application/x-mobipocket-ebook" for "prc" 
(which is a prc-based ebook format), which suggests that 
"application/vnd.palm" might not work well at least for some 
consumers.

If no, should it be removed instead?

Also note that at least one common use of the "pdb" extension is a 
debug data for Microsoft C++ Compiler, and it's actively used in 
practice.

> # HG changeset patch
> # User Yuriy Izorkin <laf...@elven.pw>
> # Date 1725541458 -10800
> #      Thu Sep 05 16:04:18 2024 +0300
> # Node ID 8bbf8ee4932f40f69aeca515dc24c0fbbeb79785
> # Parent  bf8d1f3fadf34195d26757b3ec1c004b2142842b
> MIME: added m2ts, mts and tsv extensions to video/mp2t.
> 
> Added .m2ts, .mts and .tsv extensions to type video/mp2t in
> accordance with wikipedia [1], [2].
> 
> In Apache also uses this extensions [3]:
> $ awk '/video\/mp2t/' mime.types
> video/mp2t                                      ts m2t m2ts mt
> 
> Extension usage statistics, according to httparhcive.org [4]:

Nitpicking: "httparchive.org".

> $ awk '/^m2t,/||/^m2ts,/||/^mts,/||/^ts,/||/^tsa,/||/^tsv,/' 
> httparchive_exts.csv
> ts,34671,498454
> tsv,174,326
> mts,6,10
> m2ts,1,9
> 
> Link for reference:
> 
> [1] https://en.wikipedia.org/wiki/MPEG_transport_stream
> [2] https://en.wikipedia.org/wiki/.m2ts
> [3] https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
> [4] https://httparchive.org
> 
> diff -r bf8d1f3fadf3 -r 8bbf8ee4932f conf/mime.types
> --- a/conf/mime.types   Thu Sep 05 15:09:15 2024 +0300
> +++ b/conf/mime.types   Thu Sep 05 16:04:18 2024 +0300
> @@ -86,7 +86,7 @@
>      audio/x-realaudio                                ra;
> 
>      video/3gpp                                       3gpp 3gp;
> -    video/mp2t                                       ts;
> +    video/mp2t                                       m2ts mts ts tsv;
>      video/mp4                                        mp4;
>      video/mpeg                                       mpeg mpg;
>      video/quicktime                                  mov;

Numbers as I see them suggests that all these extensions are 
rather not used in practice, at least compared to "ts".

Further, I would argue that "tsv" is a common extension for tab 
separated values format, and both Python and Apache map it to 
"text/tab-separated-values".

I would rather refrain from this change.

> # HG changeset patch
> # User Yuriy Izorkin <laf...@elven.pw>
> # Date 1725542140 -10800
> #      Thu Sep 05 16:15:40 2024 +0300
> # Node ID 62782a6dfcc3ab1891156de7b2185ed1e7ddead5
> # Parent  8bbf8ee4932f40f69aeca515dc24c0fbbeb79785
> MIME: added m4v extension to video/mp4.
> 
> Added .m4v extension to type video/mp4 in accordance with
> wikipedia [1].
> 
> Extension usage statistics, according to httparhcive.org [2]:

Nitpicking: "httparchive.org".

> $ awk '/^mp4,/||/^m4p,/||/^m4v,/' httparchive_exts.csv
> mp4,719553,2568280
> m4v,9320,20666
> 
> Link for reference:
> 
> [1] https://en.wikipedia.org/wiki/MP4_file_format
> [2] https://httparchive.org
> 
> diff -r 8bbf8ee4932f -r 62782a6dfcc3 conf/mime.types
> --- a/conf/mime.types   Thu Sep 05 16:04:18 2024 +0300
> +++ b/conf/mime.types   Thu Sep 05 16:15:40 2024 +0300
> @@ -87,7 +87,7 @@
> 
>      video/3gpp                                       3gpp 3gp;
>      video/mp2t                                       m2ts mts ts tsv;
> -    video/mp4                                        mp4;
> +    video/mp4                                        mp4 m4v;
>      video/mpeg                                       mpeg mpg;
>      video/quicktime                                  mov;
>      video/webm                                       webm;

See here about m4v/m4a as discussed earlier in this thread:

https://freenginx.org/pipermail/nginx-devel/2024-April/000141.html

Note well that this patch doesn't remove corresponding 
"video/x-m4v" type with the "m4v" extension, which makes the 
change essentially a nop (apart from producing a warning at 
startup).

> # HG changeset patch
> # User Yuriy Izorkin <laf...@elven.pw>
> # Date 1725542601 -10800
> #      Thu Sep 05 16:23:21 2024 +0300
> # Node ID 68d56080c83cb843387d779c10c2faf18ad131c4
> # Parent  62782a6dfcc3ab1891156de7b2185ed1e7ddead5
> MIME: added qt and movie extensions to video/quicktime.
> 
> Added .m4v amd .movie extensions to type video/quicktime in
> accordance with wikipedia [1].

Nitpicking: ".m4v" here probably meant to be ".qt" instead.

> 
> Extension usage statistics, according to httparhcive.org [2]:

And here.

> $ awk '/^qt,/||/^mov,/||/^movie,/' httparchive_exts.csv
> mov,15660,54855
> qt,38,110
> movie,2,3
> 
> Link for reference:
> 
> [1] https://en.wikipedia.org/wiki/QuickTime_File_Format
> [2] https://httparchive.org
> 
> diff -r 62782a6dfcc3 -r 68d56080c83c conf/mime.types
> --- a/conf/mime.types   Thu Sep 05 16:15:40 2024 +0300
> +++ b/conf/mime.types   Thu Sep 05 16:23:21 2024 +0300
> @@ -89,7 +89,7 @@
>      video/mp2t                                       m2ts mts ts tsv;
>      video/mp4                                        mp4 m4v;
>      video/mpeg                                       mpeg mpg;
> -    video/quicktime                                  mov;
> +    video/quicktime                                  qt mov movie;
>      video/webm                                       webm;
>      video/x-flv                                      flv;
>      video/x-m4v                                      m4v;

The numbers suggests that these extensions are not used in 
practice.

And at least "movie" is a way too generic extension seen being 
used with other MIME types, notably "video/x-sgi-movie" in Apache 
and Python.

We probably can consider adding just the "qt", but given the 
numbers I'm not sure it worth the effort.

> # HG changeset patch
> # User Yuriy Izorkin <laf...@elven.pw>
> # Date 1725543912 -10800
> #      Thu Sep 05 16:45:12 2024 +0300
> # Node ID e596e5031f8de008aa73fa5a26da156698874ff9
> # Parent  68d56080c83cb843387d779c10c2faf18ad131c4
> MIME: updated type for asx and asf to application/vnd.ms-asf.
> 
> Updated type for .asx and asf files to application/vnd.ms-asf in
> accordance with IANA [1], wikipedia [2] and MediaCollege [3].
> 
> Link for reference:
> 
> [1] https://www.iana.org/assignments/media-types/application/vnd.ms-asf
> [2] https://en.wikipedia.org/wiki/Advanced_Systems_Format
> [3] https://www.mediacollege.com/video/format/windows-media/files/asx.html
> 
> diff -r 68d56080c83c -r e596e5031f8d conf/mime.types
> --- a/conf/mime.types   Thu Sep 05 16:23:21 2024 +0300
> +++ b/conf/mime.types   Thu Sep 05 16:45:12 2024 +0300
> @@ -40,6 +40,7 @@
>      application/vnd.debian.binary-package            deb udeb;
>      application/vnd.google-earth.kml+xml             kml;
>      application/vnd.google-earth.kmz                 kmz;
> +    application/vnd.ms-asf                           asf asx;
>      application/vnd.ms-excel                         xls;
>      application/vnd.ms-fontobject                    eot;
>      application/vnd.ms-powerpoint                    ppt;
> @@ -94,7 +95,6 @@
>      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;
>  }

At least Apache still uses "video/x-ms-asf".  And the change 
looses details about the purpose of the file format, which might 
be the reason why "video/x-ms-asf" is still used.

Any specific reasons for the change?

> # HG changeset patch
> # User Yuriy Izorkin <laf...@elven.pw>
> # Date 1725544125 -10800
> #      Thu Sep 05 16:48:45 2024 +0300
> # Node ID 4bc854c0faa3435f3f6587a6d97c3ad6d2a3d4dc
> # Parent  e596e5031f8de008aa73fa5a26da156698874ff9
> MIME: added vma and wmv extensions to application/vnd.ms-asf.

Nitpicking: "wma".

> Added .vma and .wmv extensions to type application/vnd.ms-asf in
> accordance with wikipedia [1].

And here.

> Extension usage statistics, according to httparhcive.org [2]:

And here.

> $ awk '/^asf,/||/^asx,/||/^wma,/||/^wmv,/' httparchive_exts.csv
> asx,114,134
> wmv,35,42
> wma,29,29
> asf,4,6
> 
> Link for reference:
> [1] https://en.wikipedia.org/wiki/Advanced_Systems_Format
> [2] https://httparchive.org
> 
> diff -r e596e5031f8d -r 4bc854c0faa3 conf/mime.types
> --- a/conf/mime.types   Thu Sep 05 16:45:12 2024 +0300
> +++ b/conf/mime.types   Thu Sep 05 16:48:45 2024 +0300
> @@ -40,7 +40,7 @@
>      application/vnd.debian.binary-package            deb udeb;
>      application/vnd.google-earth.kml+xml             kml;
>      application/vnd.google-earth.kmz                 kmz;
> -    application/vnd.ms-asf                           asf asx;
> +    application/vnd.ms-asf                           asf asx wma wmv;
>      application/vnd.ms-excel                         xls;
>      application/vnd.ms-fontobject                    eot;
>      application/vnd.ms-powerpoint                    ppt;

The patch fails to remove existing "wmv" extension, which makes it 
obviously incorrect.

Apart of these, the Wikipedia article referenced says:

: The most common file extensions for ASF files are extension .WMA 
: (audio-only files using Windows Media Audio, with MIME-type 
: audio/x-ms-wma) and .WMV (files containing video, using the 
: Windows Media Audio and Video codecs, with MIME-type 
: video/x-ms-asf). These files are identical to the old .ASF files 
: but for their extension and MIME-type. The different extensions 
: are used to make it easier to identify the content of a media 
: file.

Which suggests that the proposed change would be wrong.  And it 
also looses an easy way to identify contents of the file.

Further, both Apache and Python use "video/x-ms-wmv" for "wmv".

So the question is - any specific reasons for the change?

What probably can be done here is to add "audio/x-ms-wma" for 
"wma", which we currently don't have.  Not sure it worth the 
effort though, as numbers provided suggests these are almost 
unused.  OTOH, it might make sense for consistency with the "wmv" 
type we already have.

> # HG changeset patch
> # User Yuriy Izorkin <laf...@elven.pw>
> # Date 1725544636 -10800
> #      Thu Sep 05 16:57:16 2024 +0300
> # Node ID 9d868e7469183da61987e9ff69a209f33ba0145e
> # Parent  4bc854c0faa3435f3f6587a6d97c3ad6d2a3d4dc
> MIME: updated type for avi to video/vnd.avi.
> 
> Updated type for .avi files to video/vnd.avi in accordance with
> IANA [1] and wikipedia [2].
> 
> Link for reference:
> 
> [1] 
> https://www.iana.org/assignments/wave-avi-codec-registry/wave-avi-codec-registry.xml

The link in question is for codec registry, and not the 
video/vnd.avi type.  The type itself does not seem to be 
registered though, as per IANA:

https://www.iana.org/assignments/media-types/media-types.xhtml

Further, the "video/vnd.avi" type as mentioned in the registry 
(and in RFC 2361) seems to require the "codec" parameter:

:    Appendix A and Appendix B provides an authoritative reference for the
:    interpretation of the required "codec" parameter.

This makes its use impossible within [free]nginx, since codec 
cannot be derived from the file extension.

> [2] https://ru.wikipedia.org/wiki/Audio_Video_Interleave

Nitpicking: links to articles in Russian is better avoided as long 
as there are English alternatives.

> 
> diff -r 4bc854c0faa3 -r 9d868e746918 conf/mime.types
> --- a/conf/mime.types   Thu Sep 05 16:48:45 2024 +0300
> +++ b/conf/mime.types   Thu Sep 05 16:57:16 2024 +0300
> @@ -86,6 +86,7 @@
>      audio/x-m4a                                      m4a;
>      audio/x-realaudio                                ra;
> 
> +    video/vnd.avi                                    avi;
>      video/3gpp                                       3gpp 3gp;
>      video/mp2t                                       m2ts mts ts tsv;
>      video/mp4                                        mp4 m4v;
> @@ -96,5 +97,4 @@
>      video/x-m4v                                      m4v;
>      video/x-mng                                      mng;
>      video/x-ms-wmv                                   wmv;
> -    video/x-msvideo                                  avi;
>  }

Apache still uses "video/x-msvideo", probably due to the issues 
mentioned above.

Any specific reasons for the change?

-- 
Maxim Dounin
http://mdounin.ru/

Reply via email to