On Di, 2005-11-15 at 14:48 -0500, Rodney Dawes wrote:
> 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,

[1] proposes to introduce application/x-foo MIME types for the various
contents, and use application/ogg as a their parent, thus using
application/ogg as container type, but - if there was an API for
determining whether multiple patterns are associated with a particular
file name - informing that further investigation (sniffing) is required
for determining the contents type. One of the x-foo types will match, et
voila, we got the type.

Also note that the pattern "*.pot" matches gettext templates and PPT
presentations. The MIME type can also only be determined sniffing the
contents.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=1002 

-- 
Christian Neumair <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
xdg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xdg

Reply via email to