1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-24 08:22:21 +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)
// Middleware
h := func(Context) error {
h := func(c Context) error {
method := r.Method
path := r.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)
}