mirror of
https://github.com/labstack/echo.git
synced 2025-07-15 01:34:53 +02:00
Fixed #151 - panic for invalid HTTP method
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
@ -209,7 +209,11 @@ func (r *Router) treeIndex(method string) uint8 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *Router) Find(method, path string, ctx *Context) (h HandlerFunc, e *Echo) {
|
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
|
search := path
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Reference in New Issue
Block a user