You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SimpleHTTPRequestHandler has hard coded index page list. #91219
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2022-03-19.04:25:13.984>labels= ['type-feature', 'library', '3.11']
title='SimpleHTTPRequestHandler has hard coded index page list.'updated_at=<Date2022-03-21.14:36:32.938>user='https://github.com/myronww'
SimpleHTTPRequestHandler has hard coded index page list in the send_head method. The fixed hard-coded list means that if you want to have a custom index page that is not named "index.htm" or "index.html" then you have to override the send_head method. There is alot of code in send_head so overriding it is not optimal just to have a custom indexer filename.
index.htm[l] is pretty standard for the name of the index page. What's your use-case for wanting different names? Keep in mind that the word Simple is in the name for a reason.
Activity
myronww commentedon Mar 19, 2022
SimpleHTTPRequestHandler has hard coded index page list in the send_head method. The fixed hard-coded list means that if you want to have a custom index page that is not named "index.htm" or "index.html" then you have to override the send_head method. There is alot of code in send_head so overriding it is not optimal just to have a custom indexer filename.
myronww commentedon Mar 19, 2022
I am adding a Github PR for this issue.
ethanfurman commentedon Mar 21, 2022
index.htm[l]is pretty standard for the name of the index page. What's your use-case for wanting different names? Keep in mind that the wordSimpleis in the name for a reason.gh-91219: Add an index_pages default list and parameter to SimpleHTTP…
ethanfurman commentedon Jun 23, 2022
Committed into 3.12 code base.
Revert 30935 defer bpo45162 to 312 (#94285)
gh-91219: http - use subclassing to override index_pages attribute (G…