fix path error at http2

master
兔子 5 years ago
parent d3e6058862
commit cb997cc49c

@ -171,6 +171,9 @@ func ReadFolder(w http.ResponseWriter, r *http.Request, fullpath string, isroot
if !isroot { if !isroot {
w.Write([]byte(fmt.Sprintf("<p><a href='%s'>%s</a> %s</p>\n", "..", "..", "上层文件夹"))) w.Write([]byte(fmt.Sprintf("<p><a href='%s'>%s</a> %s</p>\n", "..", "..", "上层文件夹")))
} }
if r.URL.Path == "/" {
r.URL.Path = ""
}
for _, v := range dir { for _, v := range dir {
if v.Name() != "." || v.Name() != ".." { if v.Name() != "." || v.Name() != ".." {
if !v.IsDir() { if !v.IsDir() {

Loading…
Cancel
Save