Are they valid PNGs? If so, it sounds like the mime type should just be a child of image/png and drop the glob here.<div><br clear="all"><div>J. Leclanche</div>
<br><br><div class="gmail_quote">On Tue, Mar 5, 2013 at 11:29 AM, Thomas Kluyver <span dir="ltr"><<a href="mailto:thomas@kluyver.me.uk" target="_blank">thomas@kluyver.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">I've just had a bug reported against PyXDG that a Mimetype test is returning image/x-apple-ios-png instead of image/png.<br><div class="gmail_quote"><div dir="ltr"><div><div><br></div>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.<br>




<br></div>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? 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?<br>




<div><br>[0] <a href="http://cgit.freedesktop.org/xdg/shared-mime-info/commit/freedesktop.org.xml.in?id=afbdfb40a3ff8c255e5d3dab8840cc478a007d45" target="_blank">http://cgit.freedesktop.org/xdg/shared-mime-info/commit/freedesktop.org.xml.in?id=afbdfb40a3ff8c255e5d3dab8840cc478a007d45</a><br>




<br></div><div>Thanks,<br>Thomas<br></div></div>
</div><br></div>
<br>_______________________________________________<br>
xdg mailing list<br>
<a href="mailto:xdg@lists.freedesktop.org">xdg@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/xdg" target="_blank">http://lists.freedesktop.org/mailman/listinfo/xdg</a><br>
<br></blockquote></div><br></div>