mirror of
https://github.com/labstack/echo.git
synced 2025-01-26 03:20:08 +02:00
parent
49440e762b
commit
2274d47f89
@ -286,7 +286,7 @@ func (r *Router) Find(method, path string, ctx *Context) (h HandlerFunc, e *Echo
|
|||||||
// Strip trailing slash
|
// Strip trailing slash
|
||||||
if r.echo.stripTrailingSlash {
|
if r.echo.stripTrailingSlash {
|
||||||
l := len(path)
|
l := len(path)
|
||||||
if path[l-1] == '/' {
|
if path != "" && path[l-1] == '/' { // Issue #218
|
||||||
path = path[:l-1]
|
path = path[:l-1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -300,8 +300,6 @@ func (r *Router) Find(method, path string, ctx *Context) (h HandlerFunc, e *Echo
|
|||||||
ns string // Next search
|
ns string // Next search
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: Check empty path???
|
|
||||||
|
|
||||||
// Search order static > param > match-any
|
// Search order static > param > match-any
|
||||||
for {
|
for {
|
||||||
if search == "" {
|
if search == "" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user