retry-all-errors.d 1.6 KB

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