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.

classification
Title: SimpleHTTPServer extensions_map
Type: enhancement Stage: needs patch
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: eli.bendersky, georg.brandl, joearmbruster
Priority: normal Keywords: easy, patch

Created on 2007-05-26 20:37 by joearmbruster, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg52678 - (view) Author: Joseph Armbruster (joearmbruster) Date: 2007-05-26 20:37
This is reasonably minor, but questionable nevertheless.

Inside SimpleHTTPServer.py guess_type, it grabs the mimtypes types_map then updates it with .py, .c and .h...

Except, when I look in mimetypes.py, .py, .c and .h are part of the types_map.  No patch has been submitted here, but this will be quickly patchable.
msg110453 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2010-07-16 15:31
I would like to submit a patch here. However, a decision has to be reached as for what to do exactly.

The most straightforward approach is remove the extension of types_map in the SimpleHTTPServer code. Is this acceptable, or are there hidden problems?
msg112215 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-07-31 22:02
Since http.server calls mimetypes.init(), the default type map is not used but one read from the system.  That one might as well lack the entries for .py etc.  For the sake of backwards compatibility I don't think a change is needed here.
History
Date User Action Args
2022-04-11 14:56:24adminsetgithub: 45003
2010-07-31 22:02:28georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg112215

resolution: wont fix
2010-07-16 15:31:43eli.benderskysetnosy: + eli.bendersky
messages: + msg110453
2010-07-10 10:43:37BreamoreBoysetstage: needs patch
versions: + Python 3.2, - Python 3.1, Python 2.7
2009-04-22 05:09:01ajaksu2setkeywords: + easy
2009-03-30 16:49:49ajaksu2settype: enhancement
versions: + Python 3.1, Python 2.7, - Python 2.5
2007-05-26 20:37:12joearmbrustercreate