aboutsummaryrefslogtreecommitdiff
path: root/dynamic.go
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic.go')
-rw-r--r--dynamic.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/dynamic.go b/dynamic.go
index 9df04b9..e2a2713 100644
--- a/dynamic.go
+++ b/dynamic.go
@@ -34,6 +34,12 @@ func handle(w http.ResponseWriter, r *http.Request) {
34 return 34 return
35 } 35 }
36 36
37 // redirect to add the trailing slash if missing
38 if !strings.HasSuffix(r.URL.Path, "/") {
39 http.Redirect(w, r, r.URL.Path+"/", http.StatusFound)
40 return
41 }
42
37 // get the list of dirs to parse 43 // get the list of dirs to parse
38 request := strings.TrimSuffix(r.URL.Path, "/") 44 request := strings.TrimSuffix(r.URL.Path, "/")
39 dirs := strings.Split(request, "/") 45 dirs := strings.Split(request, "/")