We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f12d77f commit 5d3ea70Copy full SHA for 5d3ea70
response.go
@@ -60,6 +60,9 @@ func (r *Response) WriteHeader(code int) {
60
// Additionally, Write will increment the size of the current response.
61
// See [http.Response.Write](https://golang.org/pkg/net/http/#Response.Write)
62
func (r *Response) Write(b []byte) (n int, err error) {
63
+ if !r.committed {
64
+ r.WriteHeader(http.StatusOK)
65
+ }
66
n, err = r.writer.Write(b)
67
r.size += int64(n)
68
return n, err
0 commit comments