Clean the Request Path early (#1817)

This will reduce the number of times we have todo a redirect.
and allow multiple slashes in path to be routed!
fixes #1644
This commit is contained in:
Dan Markham
2019-05-07 04:32:35 -07:00
committed by 田欧
parent 66d2c30c54
commit b6425689dc
2 changed files with 43 additions and 10 deletions
+1
View File
@@ -372,6 +372,7 @@ func (engine *Engine) handleHTTPRequest(c *Context) {
rPath = c.Request.URL.RawPath
unescape = engine.UnescapePathValues
}
rPath = cleanPath(rPath)
// Find root of the tree for the given HTTP method
t := engine.trees