[nginx] Update mime-types
Maxim Dounin
mdounin at mdounin.ru
Mon Apr 8 20:48:20 UTC 2024
Hello!
On Wed, Apr 03, 2024 at 12:15:14PM +0300, Lafiel wrote:
> Hello!
>
> Maxim Dounin писал(а) 2024-04-03 01:11:
> > These two seems to be closely related and probably can be merged
> > into one patch.
> >
> > Still, I'm somewhat sceptical about the idea of using
> > vendor-specific type for general formats. Preserving existing
> > application/octet-stream type might be a better option.
> >
> > Any specific reasons for the change?
>
> These types are recommended for booting a RAM disk over HTTP.
> Update commit.
Interesting. The fun fact is that it won't work anyway, since
MIME types as checked by EDK II HTTP Boot driver are misspelled,
notably it checks for "application/vnd.efi-img" (note "efi-img"
instead of "efi.img") and "application/vnd.efi-iso" (the same).
For reference, as of current master:
https://github.com/tianocore/edk2/blob/b7f8779/NetworkPkg/HttpBootDxe/HttpBootDxe.h#L79
https://github.com/tianocore/edk2/blob/b7f8779/NetworkPkg/HttpBootDxe/HttpBootSupport.c#L661
Note well that if the MIME type is not matched, extension-based
matching is used (wiki page linked says "if "Content-Type" header
is not present", which is a quite different behaviour). Given the
wrong MIME types in matching, extension-based matching is the only
code path which works in practice, and any MIME type, including
"application/binary", is expected to work well.
Dropped for now, thanks.
[...]
> > Both oga and opus seems to be almost unused:
> >
> > $ grep -E '^(ogg|oga|opus|spx),' Downloads/httparchive_exts.csv
> > ogg,15195,29547
> > oga,383,751
> > opus,14,92
> >
> > As well as spx, which is mentioned in the commit log, but not in
> > the patch.
>
> Added .spx files.
> Update commit and comments.
>
> Also I'm guessing that httparchive.org's statistics are not
> comprehensive enough.
> Example for iso files:
> ext,total_pages,total_requests
> iso,11,12
Sure, as discussed previously, HTTP Archive data is mostly focused
on how sites are built, and not on various files available for
download
(https://freenginx.org/pipermail/nginx-devel/2024-March/000099.html).
Other sources to demonstrate significance of particular extensions
are welcome.
(Also, Theora support seems to be removed from browsers, see
https://www.phoronix.com/news/Mozilla-Eyes-Dropping-Theora.)
Dropped, thanks for trying.
> > If at all, this should be also change m4v, which is a similar
> > mp4-based Apple format for video. I doubt it needs changing
> > though. Any specific reasons for the change?
>
> Later I planned to add changes for the video/mp4 mime type. Now I
> have added a commit.
Both m4a and m4v use the same container format as mp4, but they
are not mp4. Some of the files might be compatible with mp4, but
that's not something guaranteed. As such, using audio/mp4 and
video/mp4 types for them is questionable. Hence the question
about reasons.
Dropped for now, thanks for trying.
> To formats OGG and MP4, there are application/ogg and application/mp4
> types. Apache has them. Maybe they should be added too?
I don't think it is a good idea to add types unless there
practical requests.
[...]
--
Maxim Dounin
http://mdounin.ru/
More information about the nginx-devel
mailing list