mirror of
https://github.com/labstack/echo.git
synced 2024-12-22 20:06:21 +02:00
Merge branch 'ansel1-master'
This commit is contained in:
commit
4d7d141870
4
echo.go
4
echo.go
@ -545,11 +545,11 @@ func (e *Echo) ServeHTTP(req engine.Request, res engine.Response) {
|
|||||||
c.Reset(req, res)
|
c.Reset(req, res)
|
||||||
|
|
||||||
// Middleware
|
// Middleware
|
||||||
h := func(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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user