curl: make --retry-delay and --retry-max-time accept decimal seconds

Like other time options already do.

Reported-by: Alice Lee Poetics
Fixes #18109
Closes #18111
This commit is contained in:
Daniel Stenberg 2025-07-31 00:02:25 +02:00
parent 3bfcfe82b9
commit 4d025fd912
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 30 additions and 19 deletions

View file

@ -2344,10 +2344,10 @@ static ParameterError opt_filestring(struct OperationConfig *config,
err = str2unum(&config->req_retry, nextarg);
break;
case C_RETRY_DELAY: /* --retry-delay */
err = str2unummax(&config->retry_delay, nextarg, LONG_MAX/1000);
err = secs2ms(&config->retry_delay_ms, nextarg);
break;
case C_RETRY_MAX_TIME: /* --retry-max-time */
err = str2unummax(&config->retry_maxtime, nextarg, LONG_MAX/1000);
err = secs2ms(&config->retry_maxtime_ms, nextarg);
break;
case C_FTP_ACCOUNT: /* --ftp-account */
err = getstr(&config->ftp_account, nextarg, DENY_BLANK);