net/http: make Transport retry more aggressively on failures if GetBody is set #17844
Make both the http1 and http2 Transports more aggressive on idempotent retries, if the new Go 1.8 Request.GetBody is defined. That means we can back up the Body and replay the whole request.
Go 1.8 uses that for redirects, but not for connection failures.
Do that in Go 1.9.
The text was updated successfully, but these errors were encountered:
Sorry for very late reply.
I started going through the code, to understand the problem correctly.
I noticed like you mentioned, http2 transport already creating the retry Request via
At the same time, in transport.go, the same operation is done via
creating new request every time. Instead we have use to Request.GetBody to achieve that.