mirror of
https://github.com/labstack/echo.git
synced 2025-07-05 00:58:47 +02:00
6
echo.go
6
echo.go
@ -545,15 +545,15 @@ func (e *Echo) ServeHTTP(req engine.Request, res engine.Response) {
|
|||||||
c.Reset(req, res)
|
c.Reset(req, res)
|
||||||
|
|
||||||
// Middleware
|
// Middleware
|
||||||
h := func(carg Context) error {
|
h := func(c Context) error {
|
||||||
method := req.Method()
|
method := req.Method()
|
||||||
path := req.URL().Path()
|
path := req.URL().Path()
|
||||||
e.router.Find(method, path, c)
|
e.router.Find(method, path, c)
|
||||||
h := c.handler
|
h := c.Handler()
|
||||||
for i := len(e.middleware) - 1; i >= 0; i-- {
|
for i := len(e.middleware) - 1; i >= 0; i-- {
|
||||||
h = e.middleware[i](h)
|
h = e.middleware[i](h)
|
||||||
}
|
}
|
||||||
return h(carg)
|
return h(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Premiddleware
|
// Premiddleware
|
||||||
|
Reference in New Issue
Block a user