Closed ClearlyClaire closed 2 years ago
This is mentioned on https://github.com/rails/marcel/issues/48 as a regression between 0.3.3 and 1.0.0. I think regardless of if it is right or wrong, this is still a regression from the other mime DB we were using. I'll try fixing it!
Trying to detect the MIME type of an ogg vorbis file returns
audio/vorbis
, which according to https://wiki.xiph.org/MIME_Types_and_File_Extensions is for vorbis streams without containers, instead ofaudio/ogg
.This is a bit surprising and might throw some tools off, as
audio/vorbis
is generally not expected nor associated with any file format of extension (since it's for streams themselves and not files/containers).Passing
declared_type
works but it might not be provider, or provided by an untrusted source:EDIT: this seems to come from https://github.com/rails/marcel/blob/main/data/tika.xml#L5135-L5146 and introduced in Apache Tika by https://github.com/apache/tika/commit/41c6749f7372b6ac3a9acfd309a4aaca3e077a07 but I do think it's wrong, as
audio/vorbis
seem to be defined by RFC5215 and specific to RTP streams.