Retry should send headers on Write
Co-authored-by: Romain <rtribotte@users.noreply.github.com>
This commit is contained in:
parent
8e5d4c6ae9
commit
c2a294c872
2 changed files with 40 additions and 18 deletions
|
@ -196,6 +196,9 @@ func (r *responseWriterWithoutCloseNotify) Write(buf []byte) (int, error) {
|
|||
if r.ShouldRetry() {
|
||||
return len(buf), nil
|
||||
}
|
||||
if !r.written {
|
||||
r.WriteHeader(http.StatusOK)
|
||||
}
|
||||
return r.responseWriter.Write(buf)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue