1
0
Fork 0

Merge branch v2.10 into v3.0

This commit is contained in:
Fernandez Ludovic 2023-06-20 19:06:51 +02:00
commit a7ef965412
36 changed files with 751 additions and 107 deletions

View file

@ -193,7 +193,7 @@ func (r *responseWriter) WriteHeader(code int) {
r.DisableRetries()
}
if r.ShouldRetry() {
if r.ShouldRetry() || r.written {
return
}
@ -207,6 +207,13 @@ func (r *responseWriter) WriteHeader(code int) {
}
r.responseWriter.WriteHeader(code)
// Handling informational headers.
// This allows to keep writing to r.headers map until a final status code is written.
if code >= 100 && code <= 199 {
return
}
r.written = true
}