Commit 62d4b8eb authored by Yasuhiro Matsumoto's avatar Yasuhiro Matsumoto Committed by Russ Cox

http: correct path to serve index.html.

calling filepath.FromSlash(x) make invalid character to serve file.
Fixes #2128

R=golang-dev, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/4810064
parent 4143491c
......@@ -149,7 +149,7 @@ func serveFile(w ResponseWriter, r *Request, fs FileSystem, name string, redirec
// use contents of index.html for directory, if present
if d.IsDirectory() {
index := name + filepath.FromSlash(indexPage)
index := name + indexPage
ff, err := fs.Open(index)
if err == nil {
defer ff.Close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment