tFix /index.html URL recognition - partage - File upload system
(HTM) git clone git://git.z3bra.org/partage.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 33781a0e6ca43d363191709efb17ca7acb56075d
(DIR) parent 6a94727d5a729f8ee7c7b35270003eca97eb34d0
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Mon, 18 Oct 2021 16:56:25 +0200
Fix /index.html URL recognition
Diffstat:
M partage.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/partage.go b/partage.go
t@@ -164,7 +164,7 @@ func uploaderPost(w http.ResponseWriter, r *http.Request) {
func uploaderGet(w http.ResponseWriter, r *http.Request) {
// r.URL.Path is sanitized regarding "." and ".."
filename := r.URL.Path
- if r.URL.Path == "/" || r.URL.Path == "/index" {
+ if r.URL.Path == "/" || r.URL.Path == "/index.html" {
data := templatedata{ Maxsize: humanize.IBytes(uint64(conf.maxsize))}
servetemplate(w, "/index.html", data)
return