Skip to content

Commit c620735

Browse files
committed
Fix ServeHTTP
forgot a return
1 parent 55e37c2 commit c620735

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

router.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) {
226226

227227
if handle, vars, tsr := r.getValue(req.Method, path); handle != nil {
228228
handle(w, req, vars)
229+
return
229230
} else if tsr && r.RedirectTrailingSlash && path != "/" {
230231
if path[len(path)-1] == '/' {
231232
path = path[:len(path)-1]

0 commit comments

Comments
 (0)