This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kovid
Recipients brian.curtin, kovid, ned.deily
Date 2010-11-27.22:54:31
SpamBayes Score 5.004802e-06
Marked as misclassified No
Message-id <1290898473.02.0.650254927913.issue10551@psf.upfronthosting.co.za>
In-reply-to
Content
And what about the third issue?

Allow me to elaborate:

mimetypes are a relatively standard set of mappings from well known file extensions to MIME descriptors. 

Reading mimetype mappings from the registry, a location that is writable to by random programs the user may have installed on his machine, let alone malware, is a BAD idea.

It leads to situations like asking for the mimetype of file.jpg and getting iage/pjpeg back. Or asking for the mimetype of file.png and getting image/x-png back.

If you still consider it good to read mimetypes from the registry, at the very least, they should be read before the standard mimetype mappings defined in mimetypes.py are applied. That way at least for that set of mappings, users of python can be assured of sane query results. 

As it stands now, mimetypes.py is useless and to workaround the problem I essentially had to define the mimetype mappings for all the mimetypes my program knows about by hand.
History
Date User Action Args
2010-11-27 22:54:33kovidsetrecipients: + kovid, ned.deily, brian.curtin
2010-11-27 22:54:33kovidsetmessageid: <1290898473.02.0.650254927913.issue10551@psf.upfronthosting.co.za>
2010-11-27 22:54:31kovidlinkissue10551 messages
2010-11-27 22:54:31kovidcreate