2

I am looking for some common non standard MIME types like:

audio/mp3

These are the standardized MIME types. https://www.iana.org/assignments/media-types/media-types.xhtml

Because while using the mimetypes module in python I stumbled upon the aforementioned audio/mp3 MIME type, which is quite common, but wrong the correct MIME type is audio/mpeg. As discussed here Which mime type should I use for mp3.

I wasn't able to find a good list of common non standard MIME types, if someone could point me in the right direction I would be grateful.

Thx in advance

xyhlon
  • 95
  • 2
  • 9
  • if such a list existed i'd look first into the mimetypes source code as it's the most obvious way of speeding detection up. (and there's only a really small list https://github.com/python/cpython/blob/3.9/Lib/mimetypes.py) – diggusbickus Aug 30 '21 at 11:14
  • thx for the response. i read through the source and I found this list `common_types = _common_types_default = { '.rtf' : 'application/rtf', '.midi': 'audio/midi', '.mid' : 'audio/midi', '.jpg' : 'image/jpg', '.pict': 'image/pict', '.pct' : 'image/pict', '.pic' : 'image/pict', '.xul' : 'text/xul',}` the author chose to use the extension .mp3 as lookup and therefore doesn't include the wrong audio/mp3 MIME type any idea where to find those kind of duplicate non standard ones? – xyhlon Aug 30 '21 at 13:28
  • that's what i'm trying to tell you: if it's not in the mimetypes source code maybe it isn't anywhere. in the code you'll see checks to apache mime-types files but they contain only standard ones (https://github.com/apache/httpd/blob/trunk/docs/conf/mime.types). – diggusbickus Aug 30 '21 at 13:51
  • I get what you are saying, however taking a look at an example website like [link](https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_700KB.mp3) if you use the browser inspection toolkit you can see it sends a content-type in the response header of audio/mp3 and as it was discussed here [link](https://stackoverflow.com/questions/10688588/which-mime-type-should-i-use-for-mp3) this is quite common because it is an unresolved bug or problem of chrome [link](https://bugs.chromium.org/p/chromium/issues/detail?id=227004). Which was adapted by many other people for some reason. – xyhlon Aug 30 '21 at 14:32

0 Answers0