Stop calling WriteHeader in Write (#15862)

Fixes http: superfluous response.WriteHeader call from code.gitea.io/gitea/modules/context.(*Response).WriteHeader (response.go:67)

* Looking again we don't need this writeHeader as all of our downstream
implementations will always do it for us

Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
This commit is contained in:
zeripath
2021-05-14 11:05:50 +03:00
committed by GitHub
parent 05fb1f61d5
commit 2d87a84709
+1 -1
View File
@@ -49,7 +49,7 @@ func (r *Response) Write(bs []byte) (int, error) {
return size, err
}
if r.status == 0 {
r.WriteHeader(200)
r.status = http.StatusOK
}
return size, nil
}