Merge 'v1.4.0' into master

This commit is contained in:
Fernandez Ludovic 2017-10-16 23:10:44 +02:00
commit 7192aa86b5
38 changed files with 1165 additions and 327 deletions

View file

@ -249,6 +249,12 @@ func (f *httpForwarder) copyRequest(req *http.Request, u *url.URL) *http.Request
if f.rewriter != nil {
f.rewriter.Rewrite(outReq)
}
if req.ContentLength == 0 {
// https://github.com/golang/go/issues/16036: nil Body for http.Transport retries
outReq.Body = nil
}
return outReq
}