Message310468
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? |
|
Date |
User |
Action |
Args |
2018-01-23 04:16:45 | epaulson | set | recipients:
+ epaulson |
2018-01-23 04:16:45 | epaulson | set | messageid: <1516681005.05.0.467229070634.issue32628@psf.upfronthosting.co.za> |
2018-01-23 04:16:44 | epaulson | link | issue32628 messages |
2018-01-23 04:16:44 | epaulson | create | |
|