fix(mimetypes): drop `tar.gz` and `tar.bz2` and adjust `tgz`

1. mimetypes with a dot do not work with our mime detector (only checks
   last dot).
2. all of those files are tar files compressed as gzip / bzip2 so the
   real mimetype of the file is the compression not the tar.

We could at max. set mime to `application/x-tar+gzip`.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/51405/head
Ferdinand Thiessen 7 months ago
parent bbd3a3cd87
commit a234ef16f0
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
  1. 1
      resources/config/mimetypealiases.dist.json
  2. 4
      resources/config/mimetypemapping.dist.json

@ -81,7 +81,6 @@
"application/x-7z-compressed": "package/x-generic",
"application/x-bzip2": "package/x-generic",
"application/x-cbr": "text",
"application/x-compressed": "package/x-generic",
"application/x-dcraw": "image",
"application/x-deb": "package/x-generic",
"application/x-fictionbook+xml": "text",

@ -188,14 +188,12 @@
"srf": ["image/x-dcraw"],
"svg": ["image/svg+xml", "text/plain"],
"swf": ["application/x-shockwave-flash", "application/octet-stream"],
"tar.bz2": ["application/x-bzip2"],
"tar.gz": ["application/x-compressed"],
"tar": ["application/x-tar"],
"tbz2": ["application/x-bzip2"],
"tcx": ["application/vnd.garmin.tcx+xml"],
"tex": ["application/x-tex"],
"tga": ["image/tga"],
"tgz": ["application/x-compressed"],
"tgz": ["application/gzip"],
"tif": ["image/tiff"],
"tiff": ["image/tiff"],
"ttf": ["application/font-sfnt"],

Loading…
Cancel
Save