Bump Gorilla Handlers to v1.5.1.

Signed-off-by: olegburov <oleg.burov@outlook.com>
This commit is contained in:
olegburov 2020-08-31 20:48:55 -07:00 committed by Oleg Burov
parent f4506b517a
commit 03aaf6ab51
No known key found for this signature in database
GPG key ID: 99ADDD3570EB96AB
24 changed files with 1732 additions and 338 deletions

View file

@ -18,7 +18,6 @@ type canonical struct {
//
// Note: If the provided domain is considered invalid by url.Parse or otherwise
// returns an empty scheme or host, clients are not re-directed.
// not re-directed.
//
// Example:
//
@ -54,7 +53,11 @@ func (c canonical) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if !strings.EqualFold(cleanHost(r.Host), dest.Host) {
// Re-build the destination URL
dest := dest.Scheme + "://" + dest.Host + r.URL.Path
if r.URL.RawQuery != "" {
dest += "?" + r.URL.RawQuery
}
http.Redirect(w, r, dest, c.code)
return
}
c.h.ServeHTTP(w, r)