[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using mimetype and file to guess content-type
From: |
Jean Louis |
Subject: |
Re: Using mimetype and file to guess content-type |
Date: |
Tue, 8 Jun 2021 12:49:08 +0300 |
User-agent: |
Mutt/2.0.7+183 (3d24855) (2021-05-28) |
* Sergey Poznyakoff <gray@gnu.org.ua> [2021-06-08 11:53]:
> Jean Louis <bugs@gnu.support> ha escrit:
>
> > $ file --mime-type test.gpg
> > test.gpg: application/octet-stream
>
> FWIW, on my system, taking an arbitrary gpg encrypted file, I get:
>
> $ file --mime-type transcript.gpg
> transcript.gpg: application/octet-stream
Which is wrong. application/octet-stream is used for just about
anything binary, it should be
> $ file transcript.gpg
> transcript.gpg: PGP Elgamal encrypted session key - keyid: 7EF04638
> 56DFFBBA Elgamal Encrypt-Only 1024b.
The above is not MIME designation.
> Again, that depends entirely on the file database (in this case:
> mime.types) in use.
It should be application/pgp-encrypted pgp
which is in /etc/mime.types
Maybe I was using arguments wrong.
Never mind for now.
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/