tool: Add option --retry-all-errors to retry on any error

The "sledgehammer" of retrying.

Closes https://github.com/curl/curl/pull/5185
This commit is contained in:
Jay Satiro 2020-04-04 16:16:18 -04:00
parent 98e5904165
commit b995bb58cb
8 changed files with 98 additions and 1 deletions

View file

@ -197,6 +197,7 @@ static const struct LongShort aliases[]= {
{"$Y", "suppress-connect-headers", ARG_BOOL},
{"$Z", "compressed-ssh", ARG_BOOL},
{"$~", "happy-eyeballs-timeout-ms", ARG_STRING},
{"$!", "retry-all-errors", ARG_BOOL},
{"0", "http1.0", ARG_NONE},
{"01", "http1.1", ARG_NONE},
{"02", "http2", ARG_NONE},
@ -927,6 +928,9 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
if(err)
return err;
break;
case '!': /* --retry-all-errors */
config->retry_all_errors = toggle;
break;
case 'k': /* --proxy-negotiate */
if(curlinfo->features & CURL_VERSION_SPNEGO)