Bugs item #1117556, was opened at 2005-02-06 18:01 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1117556&group_id=5470
Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Matthew L Daniel (mdaniel) Assigned to: Nobody/Anonymous (nobody) Summary: SimpleHTTPServer and mimetypes: almost together Initial Comment: SimpleHTTPServer.py from python2.4 (and python2.3, so this is an old bug that hasn't bothered anyone before now), uses mimetypes for mime-type detection. The issue is that it only uses 50% of mimetypes, in two different ways. I argue that SimpleHTTPServer should not be copying mimetypes type-map into its own variable instead of leveraging the functionality found in mimetypes.guess_type (which guesses without regard to case, btw). If, however, you guys stick with your own extension_map, this bug is really about calling ``if not mimetypes.inited: mimetypes.init()'' before doing any such copying. This allows mimetypes to find mime.types on the local host and populate the types_map with lots of meaningful mime types. If it doesn't find any mime.types, no harm done. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1117556&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com