1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-10-24 08:21:36 -07:00
parent 17c8b8f2ea
commit a5024b8038

View File

@ -594,6 +594,7 @@ func WrapMiddleware(m func(http.Handler) http.Handler) MiddlewareFunc {
return func(next HandlerFunc) HandlerFunc { return func(next HandlerFunc) HandlerFunc {
return func(c Context) (err error) { return func(c Context) (err error) {
m(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { m(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
c.SetRequest(r)
err = next(c) err = next(c)
})).ServeHTTP(c.Response(), c.Request()) })).ServeHTTP(c.Response(), c.Request())
return return