mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
Handle not found in router.Find
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
5e4eec15ff
commit
4a2bdcab27
@ -171,13 +171,17 @@ func (r *router) Find(method, path string, params Params) (h HandlerFunc, echo *
|
||||
return
|
||||
}
|
||||
|
||||
pl := len(cn.prefix)
|
||||
l := lcp(search, cn.prefix)
|
||||
if l < pl {
|
||||
// Not found
|
||||
return
|
||||
}
|
||||
search = search[l:]
|
||||
|
||||
// Static node
|
||||
e := cn.findEdge(search[0])
|
||||
if e != nil {
|
||||
// Go deeper
|
||||
cn = e
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user