Commit 20195bbe authored by Rob Pike's avatar Rob Pike

Fix redirection if the page is in a subdirectory.

Fixes buggy links in the devel subdirectory.
Code from rsc; tested by me.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/197041
parent 44db1ab5
......@@ -995,6 +995,9 @@ func serveFile(c *http.Conn, r *http.Request) {
}
if dir != nil && dir.IsDirectory() {
if redirect(c, r) {
return
}
if index := path + "/index.html"; isTextFile(index) {
serveHTMLDoc(c, r, index)
return
......
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