Open mitar opened 2 years ago
In particular, it does not look like the package retries GET requests at all. The initial resp.Body
is passed as-is so if the request is retried, it does not continue reading where it left of.
I have made it, a RetryableResponse
: https://pkg.go.dev/gitlab.com/tozd/go/x#RetryableResponse
I am trying to download a large file over HTTP and connection is getting simply terminated by the server. With
wget
it automatically retries because it knows that download has not yet reachedContent-Length
response size. But I was hoping that this package will also retry but it seems this is not so. So I am opening a feature request to suggest that it should retry also if:Content-Length
header in response.Range
request header.