aboutsummaryrefslogtreecommitdiffstats
path: root/modules/context
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-05-14 09:05:50 +0100
committerGitHub <noreply@github.com>2021-05-14 11:05:50 +0300
commit2d87a84709cb0ee89b2fbafe65718bd61d9effef (patch)
tree1ce483afb63ba5e1d441631a6ef96777c1d4b10c /modules/context
parent05fb1f61d56c29f5637dc7fba218e92a24145f92 (diff)
downloadgitea-2d87a84709cb0ee89b2fbafe65718bd61d9effef.tar.gz
gitea-2d87a84709cb0ee89b2fbafe65718bd61d9effef.zip
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 <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'modules/context')
-rw-r--r--modules/context/response.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/context/response.go b/modules/context/response.go
index 4ffbd230a2..a20fc63536 100644
--- a/modules/context/response.go
+++ b/modules/context/response.go
@@ -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
}