Merge branch v2.10 into v3.0
This commit is contained in:
commit
a7ef965412
36 changed files with 751 additions and 107 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue