Browse Source

Stop calling WriteHeader in Write (#15862) (#15873)

Backport #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>
mj-v1.14.3
zeripath 1 year ago
committed by GitHub
parent
commit
cbaf8e8785
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      modules/context/response.go

2
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
}

Loading…
Cancel
Save