Fwd: Conflicting mime types

Bastien Nocera hadess at hadess.net
Tue Mar 5 04:44:52 PST 2013


On Tue, 2013-03-05 at 11:29 +0000, Thomas Kluyver wrote:
> I've just had a bug reported against PyXDG that a Mimetype test is
> returning image/x-apple-ios-png instead of image/png.

Your implementation returns results differently from the one we use in
shared-mime-info itself.

> Looking at the XML mime type definitions [0], this new mime type
> ('Apple broken PNGs') has the same glob as regular pngs: *.png. They
> can be distinguished by magic sniffing, but the test in question is
> specifically for when only a filename is available.
> 
> 
> Obviously, a filename like foo.png should be presumed to be image/png
> over image/x-apple-ios-png. But how should this be done?

By lowering the priority of the *png associated with
image/x-apple-ios-png, which I've now done in master.

>  Should we prefer mimetypes without the x- prefix? Could there be a
> collision between two mimetypes neither of which have an x-? Is there
> some other heuristic we can use?

Cheers




More information about the xdg mailing list