Skip to content

Commit

Permalink
Fix " http: superfluous response.WriteHeader call from ..." on embedd…
Browse files Browse the repository at this point in the history
…ed resp setter (#209)
  • Loading branch information
vearutop authored Oct 6, 2024
1 parent a1d052b commit dec6d06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion response/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ func (h *Encoder) WriteSuccessfulResponse(
}

if skipRendering {
if ht.SuccessStatus != http.StatusOK {
if !h.outputWithWriter && !h.dynamicSetter && ht.SuccessStatus != http.StatusOK {
w.WriteHeader(ht.SuccessStatus)
}

Expand Down

0 comments on commit dec6d06

Please sign in to comment.