mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-27 10:50:13 +08:00
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>
This commit is contained in:
parent
05fb1f61d5
commit
2d87a84709
|
@ -49,7 +49,7 @@ func (r *Response) Write(bs []byte) (int, error) {
|
||||||
return size, err
|
return size, err
|
||||||
}
|
}
|
||||||
if r.status == 0 {
|
if r.status == 0 {
|
||||||
r.WriteHeader(200)
|
r.status = http.StatusOK
|
||||||
}
|
}
|
||||||
return size, nil
|
return size, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user