This commit is contained in:
Mark McGranaghan 2012-10-01 17:42:59 -07:00
parent 13f1925439
commit 7ea21a9e17

View File

@ -20,7 +20,7 @@ func wrapCanonicalHost(f handler, chost string) handler {
if host != chost {
fmt.Println("redirect to", chost)
hostPort[0] = chost
url := "http://" +
url := "http://" +
strings.Join(hostPort, ":") +
r.URL.String()
http.Redirect(w, r, url, 301)