# wget(1) is flaky, on the GitLab ARM runners downloading from github.com,
# with intermittent “unable to establish SSL connection” that I can’t figure
# out how to retry, so use curl(1) instead.

# follow redirects
location

# use server-specified filename (same as -O and -J) unless overridden with -o
remote-name-all
remote-header-name

# global timeout for the whole download (seconds)
max-time = 120

# connection timeout, including TLS handshake (seconds)
connect-timeout = 15

# number of retries (exponential back-off)
retry = 8

# retry connection refused
retry-connrefused

# “retry on any error ... the ‘sledgehammer’ of retrying”
retry-all-errors

# remove partly download files on error (before retry)
# not all curls support this
remove-on-error