From cbf2d901a6896220ed0d8cd5e8fb463d3f9b1b55 Mon Sep 17 00:00:00 2001 From: Rich Gibson Date: Tue, 6 Aug 2024 14:43:11 -0700 Subject: [PATCH] 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. --- pelican/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/server.py b/pelican/server.py index ebf13677..408bfd4c 100644 --- a/pelican/server.py +++ b/pelican/server.py @@ -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,