mirror of
https://github.com/golang/go
synced 2024-11-24 08:10:09 -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:
parent
44db1ab526
commit
20195bbe61
@ -995,6 +995,9 @@ func serveFile(c *http.Conn, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if dir != nil && dir.IsDirectory() {
|
if dir != nil && dir.IsDirectory() {
|
||||||
|
if redirect(c, r) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if index := path + "/index.html"; isTextFile(index) {
|
if index := path + "/index.html"; isTextFile(index) {
|
||||||
serveHTMLDoc(c, r, index)
|
serveHTMLDoc(c, r, index)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user