about summary refs log tree commit diff stats
path: root/cmd/server/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/server/server.go')
-rw-r--r--cmd/server/server.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/server/server.go b/cmd/server/server.go
index 39feb86..9c9911a 100644
--- a/cmd/server/server.go
+++ b/cmd/server/server.go
@@ -101,12 +101,13 @@ type HTTPError struct {
 }
 
 func canonicalisePath(path string) (cPath string, differs bool) {
+	cPath = path
 	if strings.HasSuffix(path, "/index.html") {
 		cPath, differs = strings.CutSuffix(path, "index.html")
 	} else if !strings.HasSuffix(path, "/") && files[path+"/"] != (File{}) {
 		cPath, differs = path+"/", true
 	}
-	return path, differs
+	return cPath, differs
 }
 
 func serveFile(w http.ResponseWriter, r *http.Request) *HTTPError {