1
0
mirror of https://github.com/golang/go synced 2024-11-12 09:20:22 -07:00

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
This commit is contained in:
Rob Pike 2010-02-01 17:17:25 +11:00
parent 44db1ab526
commit 20195bbe61

View File

@ -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