Fix /index.html URL recognition
git-svn-id: file:///srv/svn/repo/marisa/trunk@16 d6811dac-2434-b64a-9ddc-f563ab233461
This commit is contained in:
@@ -164,7 +164,7 @@ func uploaderPost(w http.ResponseWriter, r *http.Request) {
|
|||||||
func uploaderGet(w http.ResponseWriter, r *http.Request) {
|
func uploaderGet(w http.ResponseWriter, r *http.Request) {
|
||||||
// r.URL.Path is sanitized regarding "." and ".."
|
// r.URL.Path is sanitized regarding "." and ".."
|
||||||
filename := r.URL.Path
|
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))}
|
data := templatedata{ Maxsize: humanize.IBytes(uint64(conf.maxsize))}
|
||||||
servetemplate(w, "/index.html", data)
|
servetemplate(w, "/index.html", data)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user