Change order of SUFFIXES so index.html is served even if a file named '.html' exists.

A file named .html should not exist in output. But somehow I ended up with one, and it was difficult to debug. Changing the order of the SUFFIXES allows the index.html file to be served before checking for .html.
This commit is contained in:
Rich Gibson 2024-08-06 14:43:11 -07:00
commit cbf2d901a6

View file

@ -49,7 +49,7 @@ def parse_arguments():
class ComplexHTTPRequestHandler(server.SimpleHTTPRequestHandler):
SUFFIXES = [".html", "/index.html", "/", ""]
SUFFIXES = ["/index.html",".html", "/", ""]
extensions_map = {
**server.SimpleHTTPRequestHandler.extensions_map,