diff --git a/gin.go b/gin.go index 1633fe13..69bf1673 100644 --- a/gin.go +++ b/gin.go @@ -699,6 +699,7 @@ func redirectTrailingSlash(c *Context) { p = prefix + "/" + req.URL.Path } req.URL.Path = p + "/" + p = regRemoveRepeatedChar.ReplaceAllString(p, "/") if length := len(p); length > 1 && p[length-1] == '/' { req.URL.Path = p[:length-1] }