1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

Merge pull request #413 from mtojek/fix_fasthttp_response_size_2

Fix missing response size
This commit is contained in:
Vishal Rana 2016-03-16 14:30:42 -07:00
commit bbb94b6e79

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.