[Python-checkins] r46956 - in python/branches/release24-maint: Lib/SimpleHTTPServer.py Misc/NEWS
georg.brandl
python-checkins at python.org
Wed Jun 14 10:50:06 CEST 2006
Author: georg.brandl
Date: Wed Jun 14 10:50:05 2006
New Revision: 46956
Modified:
python/branches/release24-maint/Lib/SimpleHTTPServer.py
python/branches/release24-maint/Misc/NEWS
Log:
Bug #1117556: SimpleHTTPServer now tries to find and use the system's
mime.types file for determining MIME types.
(backport from rev. 46955)
Modified: python/branches/release24-maint/Lib/SimpleHTTPServer.py
==============================================================================
--- python/branches/release24-maint/Lib/SimpleHTTPServer.py (original)
+++ python/branches/release24-maint/Lib/SimpleHTTPServer.py Wed Jun 14 10:50:05 2006
@@ -185,7 +185,9 @@
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
Modified: python/branches/release24-maint/Misc/NEWS
==============================================================================
--- python/branches/release24-maint/Misc/NEWS (original)
+++ python/branches/release24-maint/Misc/NEWS Wed Jun 14 10:50:05 2006
@@ -53,6 +53,9 @@
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.
More information about the Python-checkins
mailing list