mirror of
https://github.com/buckit-io/buckit.git
synced 2026-10-03 20:20:31 +00:00
ed6d2a100f
This commit fixes a misuse of the `http.ResponseWriter.WriteHeader`. A caller should **either** call `WriteHeader` exactly once **or** write to the response writer and causing an implicit 200 OK. Writing the response headers more than once causes a `http: superfluous response.WriteHeader call` log message. This commit fixes this by preventing a 2nd `WriteHeader` call being forwarded to the underlying `ResponseWriter`. Updates #10587