puremagic
puremagic copied to clipboard
`.wav` files detected as `audio/wave` when maybe they should be `audio/wav`
As far as I can tell, the "correct" type to return for a .wav file (with 52 49 46 46 xx xx xx xx 57 41 56 45 66 6d 74 20 is audio/wav - but this library returns audio/wave.
I got very confused looking through the code because I came across these two lines:
https://github.com/cdgriffith/puremagic/blob/763349ec4d02ba930fb1142c6eb684afdf06c6ab/puremagic/magic_data.json#L103 https://github.com/cdgriffith/puremagic/blob/763349ec4d02ba930fb1142c6eb684afdf06c6ab/puremagic/magic_data.json#L1118
I've found it hard to research the correct resolution though, as both audio/wav and audio/wave are entirely missing from what I thought was the official RFC for these! https://www.iana.org/assignments/media-types/media-types.xhtml#audio
MDN lists audio/wav https://developer.mozilla.org/en-US/docs/Web/HTTP/MIME_types/Common_types
I'm not sure there is a correct answer to this question.