mirror of
https://github.com/labstack/echo.git
synced 2025-03-11 14:49:56 +02:00
parent
f12d77f9cf
commit
5d3ea7014b
@ -60,6 +60,9 @@ func (r *Response) WriteHeader(code int) {
|
||||
// Additionally, Write will increment the size of the current response.
|
||||
// See [http.Response.Write](https://golang.org/pkg/net/http/#Response.Write)
|
||||
func (r *Response) Write(b []byte) (n int, err error) {
|
||||
if !r.committed {
|
||||
r.WriteHeader(http.StatusOK)
|
||||
}
|
||||
n, err = r.writer.Write(b)
|
||||
r.size += int64(n)
|
||||
return n, err
|
||||
|
Loading…
x
Reference in New Issue
Block a user