1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-01 00:55:04 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-10-21 12:49:08 -07:00
parent 51723e4c7c
commit be7d6962f0

View File

@ -478,11 +478,11 @@ func (e *Echo) ServeHTTP(w http.ResponseWriter, r *http.Request) {
c.Reset(r, w) c.Reset(r, w)
// Middleware // Middleware
h := func(Context) error { h := func(c Context) error {
method := r.Method method := r.Method
path := r.URL.Path path := r.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)
} }