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:
parent
e16b929900
commit
9d8c2107d1
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user