Skip to content

Commit 2d87a84

Browse files
zeripathlafriks
andauthored
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]>
1 parent 05fb1f6 commit 2d87a84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/context/response.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (r *Response) Write(bs []byte) (int, error) {
4949
return size, err
5050
}
5151
if r.status == 0 {
52-
r.WriteHeader(200)
52+
r.status = http.StatusOK
5353
}
5454
return size, nil
5555
}

0 commit comments

Comments
 (0)