diff options
Diffstat (limited to 'src/net/http/server.go')
-rw-r--r-- | src/net/http/server.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net/http/server.go b/src/net/http/server.go index 57e1b5dacb..88e00a2edd 100644 --- a/src/net/http/server.go +++ b/src/net/http/server.go @@ -2233,6 +2233,9 @@ func (mux *ServeMux) redirectToPathSlash(host, path string, u *url.URL) (*url.UR // path+"/". This should happen if a handler is registered for path+"/" but // not path -- see comments at ServeMux. func (mux *ServeMux) shouldRedirect(host, path string) bool { + mux.mu.RLock() + defer mux.mu.RUnlock() + p := []string{path, host + path} for _, c := range p { |