mirror of
https://github.com/golang/go
synced 2024-11-15 02:40:32 -07:00
net/http: clarify ServeMux path sanitization
For #70130 Change-Id: Idd7ca3d11b78887709b83dd5c868de9cc506ecff Reviewed-on: https://go-review.googlesource.com/c/go/+/623835 Reviewed-by: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
This commit is contained in:
parent
f7a14ae0cd
commit
d6df73ce40
@ -2480,6 +2480,8 @@ func RedirectHandler(url string, code int) Handler {
|
||||
// ServeMux also takes care of sanitizing the URL request path and the Host
|
||||
// header, stripping the port number and redirecting any request containing . or
|
||||
// .. segments or repeated slashes to an equivalent, cleaner URL.
|
||||
// Escaped path elements such as "%2e" for "." and "%2f" for "/" are preserved
|
||||
// and aren't considered separators for request routing.
|
||||
//
|
||||
// # Compatibility
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user