diff --git a/echo.go b/echo.go index 648057be..6247fbdd 100644 --- a/echo.go +++ b/echo.go @@ -545,11 +545,11 @@ func (e *Echo) ServeHTTP(req engine.Request, res engine.Response) { c.Reset(req, res) // Middleware - h := func(Context) error { + h := func(c Context) error { method := req.Method() path := req.URL().Path() e.router.Find(method, path, c) - h := c.handler + h := c.Handler() for i := len(e.middleware) - 1; i >= 0; i-- { h = e.middleware[i](h) }