2
0

retry-all-errors.d 1.5 KB

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