mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
Fixed #151 - panic for invalid HTTP method
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
17c83a01a4
commit
fd427bc943
@ -209,7 +209,11 @@ func (r *Router) treeIndex(method string) uint8 {
|
||||
}
|
||||
|
||||
func (r *Router) Find(method, path string, ctx *Context) (h HandlerFunc, e *Echo) {
|
||||
cn := r.trees[r.treeIndex(method)] // Current node as root
|
||||
i := r.treeIndex(method)
|
||||
if i > 20 {
|
||||
return
|
||||
}
|
||||
cn := r.trees[i] // Current node as root
|
||||
search := path
|
||||
|
||||
var (
|
||||
|
Loading…
Reference in New Issue
Block a user