diff options
Diffstat (limited to 'vendor/github.com/labstack/echo/v4/response.go')
-rw-r--r-- | vendor/github.com/labstack/echo/v4/response.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/github.com/labstack/echo/v4/response.go b/vendor/github.com/labstack/echo/v4/response.go index ca7405c5..84f7c9e7 100644 --- a/vendor/github.com/labstack/echo/v4/response.go +++ b/vendor/github.com/labstack/echo/v4/response.go @@ -56,11 +56,11 @@ func (r *Response) WriteHeader(code int) { r.echo.Logger.Warn("response already committed") return } + r.Status = code for _, fn := range r.beforeFuncs { fn() } - r.Status = code - r.Writer.WriteHeader(code) + r.Writer.WriteHeader(r.Status) r.Committed = true } |