Bug #1117556: SimpleHTTPServer now tries to find and use the system's

mime.types file for determining MIME types.
This commit is contained in:
Georg Brandl 2006-06-14 08:50:03 +00:00
parent 0540be96f3
commit 83cc0d0add
2 changed files with 6 additions and 1 deletions

View File

@ -192,6 +192,8 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
else:
return self.extensions_map['']
if not mimetypes.inited:
mimetypes.init() # try to read system mime.types
extensions_map = mimetypes.types_map.copy()
extensions_map.update({
'': 'application/octet-stream', # Default

View File

@ -156,6 +156,9 @@ Extension Modules
Library
-------
- Bug #1117556: SimpleHTTPServer now tries to find and use the system's
mime.types file for determining MIME types.
- Bug #1339007: Shelf objects now don't raise an exception in their
__del__ method when initialization failed.