Nil request body with retry
This commit is contained in:
parent
37d8e32e0b
commit
3f044c48fa
4 changed files with 6 additions and 3 deletions
|
@ -35,6 +35,9 @@ func (retry *Retry) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
|||
// cf https://github.com/containous/traefik/issues/1008
|
||||
if retry.attempts > 1 {
|
||||
body := r.Body
|
||||
if body == nil {
|
||||
body = http.NoBody
|
||||
}
|
||||
defer body.Close()
|
||||
r.Body = ioutil.NopCloser(body)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue