go.tools/cmd/godoc: permit dash and capitals in redirect paths
This was causing some /blog/foo-bar-baz paths to 404. R=golang-dev, r CC=golang-dev https://golang.org/cl/13640044
This commit is contained in:
parent
1564988897
commit
334d56a124
|
|
@ -165,7 +165,7 @@ func makeRedirectHandler(target string) http.HandlerFunc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var validId = regexp.MustCompile(`^[a-z0-9]*$`)
|
var validId = regexp.MustCompile(`^[A-Za-z0-9-]*$`)
|
||||||
|
|
||||||
func makePrefixRedirectHandler(prefix, baseURL string) http.HandlerFunc {
|
func makePrefixRedirectHandler(prefix, baseURL string) http.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue