blob: a1fb89e9dde69171092937cd392ef25d9ef4cd0d [file] [log] [blame]
xf.libfc6e712025-02-07 01:54:34 -08001c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
2SPDX-License-Identifier: curl
3Long: retry-all-errors
4Help: Retry all errors (use with --retry)
5Added: 7.71.0
6Category: curl
7Example: --retry 5 --retry-all-errors $URL
8See-also: retry
9Multi: boolean
10---
11Retry on any error. This option is used together with --retry.
12
13This option is the "sledgehammer" of retrying. Do not use this option by
14default (eg in curlrc), there may be unintended consequences such as sending or
15receiving duplicate data. Do not use with redirected input or output. You'd be
16much better off handling your unique problems in shell script. Please read the
17example below.
18
19**WARNING**: For server compatibility curl attempts to retry failed flaky
20transfers as close as possible to how they were started, but this is not
21possible with redirected input or output. For example, before retrying it
22removes output data from a failed partial transfer that was written to an
23output file. However this is not true of data redirected to a | pipe or >
24file, which are not reset. We strongly suggest you do not parse or record
25output via redirect in combination with this option, since you may receive
26duplicate data.
27
28By default curl will not error on an HTTP response code that indicates an HTTP
29error, if the transfer was successful. For example, if a server replies 404
30Not Found and the reply is fully received then that is not an error. When
31--retry is used then curl will retry on some HTTP response codes that indicate
32transient HTTP errors, but that does not include most 4xx response codes such
33as 404. If you want to retry on all response codes that indicate HTTP errors
34(4xx and 5xx) then combine with --fail.