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.

Author epaulson
Recipients epaulson
Date 2018-01-23.04:16:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1516681005.05.0.467229070634.issue32628@psf.upfronthosting.co.za>
In-reply-to
Content
In http.server and SimpleHTTPRequestHandler - the send_head function is hard-coded to treat index.html and index.htm as files to return in a directory - if neither of those files are present, it lists the directory. 

It would be very nice to be able to specify other files to use as a directory index, similar to the DirectoryIndex directive from Apache.

I think it'd be straight forward to add some kind of list you could set, just like you can modify extensions_map to include other types of MIME types. 

Would it be OK to just add a directory_index list with index.html and index.htm on by default that people could do like
Handler.directory_index.append("index.htmlx") in their setup? Or would such an API be better with some kind of helper?
History
Date User Action Args
2018-01-23 04:16:45epaulsonsetrecipients: + epaulson
2018-01-23 04:16:45epaulsonsetmessageid: <1516681005.05.0.467229070634.issue32628@psf.upfronthosting.co.za>
2018-01-23 04:16:44epaulsonlinkissue32628 messages
2018-01-23 04:16:44epaulsoncreate