MIME info spec: Handling containers/multiple MIME types per glob pattern
Rodney Dawes
dobey at novell.com
Tue Nov 15 11:48:59 PST 2005
On Tue, 2005-11-15 at 19:53 +0100, Christian Neumair wrote:
> We'll run into the following issue in the long term:
> There is an n:1 mapping between MIME types, and glob patterns, i.e.
> "text/x-patch" has "*.diff" and "*.patch", but the "*.ogg" pattern
> cannot have multiple MIME types associated.
> Since we have a few container formats like Windows Media or Ogg, there
> is no way of telling xdgmime clients that multiple applications match a
> matched pattern, i.e. that a "*.ogg" file can be an Ogg Theora, or an
> Ogg Vorbis stream, thus requiring the application to do MIME sniffing
> before being able what MIME type the file actually is.
In the OGG case, MIME sniffing won't help at all. There is an RFC for
the application/ogg MIME type, and by definition, all OGG files should
be that type, regardless of content. To fix the issue, we are going to
have to come up with something that either goes beyond the MIME type
itself, and checks other file data, or fix the MIME type naming screwups
from the rest of the world, and impart proper types for different types
of files, regardless of extensions. Always sniffing the first 1K of a
file, should probably be a non-issue in terms of performance, I think.
I would however, love to see the issues fixed with the various file
types like this though. The silliness just makes it very hard to show
the proper icon to the user. :-/
-- dobey
More information about the xdg
mailing list