retry-all-errors.d 1.7 KB

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