fix bug : gin config `RemoveExtraSlash` do not work when use static path

This commit is contained in:
goodaye 2021-10-06 09:49:15 +08:00
parent 1a2bc0e7cb
commit 585a6c484b
1 changed files with 1 additions and 0 deletions

1
gin.go
View File

@ -519,6 +519,7 @@ func (engine *Engine) handleHTTPRequest(c *Context) {
if engine.RemoveExtraSlash { if engine.RemoveExtraSlash {
rPath = cleanPath(rPath) rPath = cleanPath(rPath)
c.Request.URL.Path = rPath
} }
// Find root of the tree for the given HTTP method // Find root of the tree for the given HTTP method