From 521ea7b17d02faf8d3afea6737573942ceac59c5 Mon Sep 17 00:00:00 2001 From: "Nguyen Ngoc Trung (Steven)" Date: Tue, 23 Oct 2018 19:08:00 -0700 Subject: [PATCH] Use constant for 301 status code in regexp.go (#412) --- regexp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regexp.go b/regexp.go index 2b57e56..b92d59f 100644 --- a/regexp.go +++ b/regexp.go @@ -296,7 +296,7 @@ func (v *routeRegexpGroup) setMatch(req *http.Request, m *RouteMatch, r *Route) } else { u.Path += "/" } - m.Handler = http.RedirectHandler(u.String(), 301) + m.Handler = http.RedirectHandler(u.String(), http.StatusMovedPermanently) } } }