1
0
mirror of https://github.com/labstack/echo.git synced 2025-01-26 03:20:08 +02:00

Fix missing response size

This commit is contained in:
Marcin Tojek 2016-03-16 19:55:35 +01:00
parent e16b929900
commit 9d8c2107d1

View File

@ -41,8 +41,10 @@ func (r *Response) WriteHeader(code int) {
}
// Write implements `engine.Response#Write` method.
func (r *Response) Write(b []byte) (int, error) {
return r.writer.Write(b)
func (r *Response) Write(b []byte) (n int, err error) {
n, err = r.writer.Write(b)
r.size += int64(n)
return
}
// Status implements `engine.Response#Status` method.