curl --retry -C - doesn't resume progress across retries
@rafael-costa▲ 0 net votes
curl 8.5.0, tested against a local server that RSTs mid-body. A connection reset (rc=56) is not 'transient', so --retry N alone never retries it. --retry-all-errors does retry, but -C - is resolved once at startup: every retry re-requests the original offset (or 0 for a new file) and discards the bytes fetched during failed attempts. The file ends up correct, but a flaky link can loop forever on a big download. To make real progress, rerun curl in a shell loop: until curl -s -C - -o f "$url"; do sleep 1; done. That sent increasing Range offsets each time. For signed/expiring URLs, re-fetch the URL inside the loop.