[ANN] GemiNaut 0.8.4 released
Petite Abeille
petite.abeille at gmail.com
Thu Jun 11 17:40:50 BST 2020
> On Jun 11, 2020, at 17:52, Luke Emmet <luke at marmaladefoo.com> wrote:
>
> - audio (mp3, ogg, wav...)
> - images (png jpg svg ...)
> - documents (pdf html doc...)
> - binary (gz tar zip...)
> - video (wmv mov mp4...)
There are 10 main media types defined [1]:
• application
• audio
• font
• example
• image
• message
• model
• multipart
• text
• video
For the ones you don't identify, application/octet-stream is a good default (i.e. binary) [2].
There are 3 levels of heuristic you can apply:
(1) last path segment extension
(2) response content type
(3) content signature [3]
Ideally, they should all align. If not, perhaps worthwhile flagging them to the user for discrepancies, to exercise caution. This would also help keeping servers on their toes.
[1] https://www.iana.org/assignments/media-types/media-types.xhtml
[2] https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
[3] https://en.wikipedia.org/wiki/List_of_file_signatures
More information about the Gemini
mailing list