[nginx] Update mime-types

Izorkin izorkin at elven.pw
Sun Feb 25 12:33:32 UTC 2024


Hello, 
Maksim.

Like 
that?

# 
HG 
changeset 
patch
# 
User 
Yuriy 
Izorkin 
<lafiel at elven.pw>
# 
Date 
1708074268 
-10800
# 
  
  
  
  
  
Fri 
Feb 
16 
12:04:28 
2024 
+0300
# 
Branch 
update-mime-types
# 
Node 
ID 
2343683b93bc2144073e4c808a3951de83b67d95
# 
Parent 
  
89bff782528a91ad123b63b624f798e6fd9c8e68
MIME: 
change 
type 
image/x-ms-bmp 
to 
image/image

For 
.bmp 
and 
.dib 
files 
the 
image/bmp 
mime 
type 
is 
used 
according 
to 
IANA 
[1].
Apache 
also 
uses 
this 
type 
[2].

The 
.dib 
file 
is 
a 
BMP 
file 
without 
the 
14-byte 
file 
header 
[3].

Extension 
usage 
statistics, 
according 
to 
httparhcive.org:
$ 
awk 
'NR==1||/^bmp,/||/^dib,/' 
httparchive_exts.csv
ext,total_pages,total_requests
bmp,17013,37954
dib,22,28

The 
csv 
file 
was 
made 
with 
the 
following 
query:

SELECT
  
  
ext,
  
  
COUNT(distinct 
pageid) 
total_pages,
  
  
COUNT(0) 
total_requests
FROM
  
  
`httparchive.summary_requests.2024_01_01_desktop`
GROUP 
BY
  
  
ext
ORDER 
BY
  
  
total_requests 
DESC

Link 
for 
reference:

[1] 
https://www.iana.org/assignments/media-types/image/bmp
[2] 
https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
[3] 
http://fileformats.archiveteam.org/wiki/BMP
[4] 
https://httparchive.org

This 
will 
require 
a 
lot 
of 
free 
time 
:(


Maxim 
Dounin 
писал(а) 
2024-02-24 
05:01:
> I would suggest to provide more details and rationale for 
> each
> change suggested: why the change is needed, which problems 
> it
> solves, if there are any compatibility concerns, and so 
> on.


I 
tried 
to 
cover 
all 
possible 
options 
so 
that 
wouldn't 
have 
to 
manually
change 
the 
conf/mime.types 
file 
if 
needed. 
For 
example. 
This 
is
problematic 
to 
do 
in 
NixOS, 
because 
will 
need 
to 
make 
changes 
at 
the 
OS
level, 
because 
by 
default 
the 
file 
is 
locked 
for 
modification.


> Note well that nginx (and freenginx) does not try to provide 
> all
> existing MIME types and extensions in the mime.types file, 
> but
> rather lists most common ones.  As such, it when adding new 
> types
> and extensions there should be some justification that it needs 
> to
> be added (httparchive.org might be a good data source 
> here).


-- 
Best 
regards,
Izorkin
mailto:izorkin at elven.pw
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0xD06A6838.asc
Type: application/pgp-keys
Size: 1875 bytes
Desc: not available
URL: <http://freenginx.org/pipermail/nginx-devel/attachments/20240225/f9ceebda/attachment.asc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <http://freenginx.org/pipermail/nginx-devel/attachments/20240225/f9ceebda/attachment.sig>


More information about the nginx-devel mailing list