diff options
author | Georg Brandl <georg@python.org> | 2006-06-14 08:50:03 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-06-14 08:50:03 (GMT) |
commit | 83cc0d0addd23dbd2b32f4de9835538496ad71cd (patch) | |
tree | 3d95739b6f53dd4f3d7415b26ff128a6da8d2485 | |
parent | 0540be96f3b4f9fa684ee7ce4f9e777a169d8138 (diff) | |
download | cpython-83cc0d0addd23dbd2b32f4de9835538496ad71cd.zip cpython-83cc0d0addd23dbd2b32f4de9835538496ad71cd.tar.gz cpython-83cc0d0addd23dbd2b32f4de9835538496ad71cd.tar.bz2 |
Bug #1117556: SimpleHTTPServer now tries to find and use the system's
mime.types file for determining MIME types.
-rw-r--r-- | Lib/SimpleHTTPServer.py | 4 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Lib/SimpleHTTPServer.py b/Lib/SimpleHTTPServer.py index 089936f..6f348a1 100644 --- a/Lib/SimpleHTTPServer.py +++ b/Lib/SimpleHTTPServer.py @@ -191,7 +191,9 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): return self.extensions_map[ext] 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 @@ -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. |