add xz and gz mimetypes, and dont say pdf on random binaries

This commit is contained in:
Xfnw knuu 2021-01-14 20:03:42 -05:00
parent c7878de3dd
commit f35506829a

View file

@ -109,7 +109,7 @@ function mime2ext($mime) {
'application/x-pkcs7-certreqresp' => 'p7r',
'application/pkcs7-signature' => 'p7s',
'application/pdf' => 'pdf',
'application/octet-stream' => 'pdf',
'application/octet-stream' => 'bin',
'application/x-x509-user-cert' => 'pem',
'application/x-pem-file' => 'pem',
'application/pgp' => 'pgp',
@ -145,6 +145,11 @@ function mime2ext($mime) {
'application/x-shockwave-flash' => 'swf',
'application/x-tar' => 'tar',
'application/x-gzip-compressed' => 'tgz',
'application/x-gzip' => 'gz',
'application/gzip' => 'gz',
'application/x-xz' => 'xz',
'application/xz' => 'xz',
'application/zstd' => 'zstd',
'image/tiff' => 'tiff',
'text/plain' => 'txt',
'text/x-vcard' => 'vcf',