1*6236dae4SAndroid Build Coastguard Worker--- 2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al. 3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl 4*6236dae4SAndroid Build Coastguard WorkerLong: retry 5*6236dae4SAndroid Build Coastguard WorkerArg: <num> 6*6236dae4SAndroid Build Coastguard WorkerAdded: 7.12.3 7*6236dae4SAndroid Build Coastguard WorkerHelp: Retry request if transient problems occur 8*6236dae4SAndroid Build Coastguard WorkerCategory: curl 9*6236dae4SAndroid Build Coastguard WorkerMulti: single 10*6236dae4SAndroid Build Coastguard WorkerSee-also: 11*6236dae4SAndroid Build Coastguard Worker - retry-max-time 12*6236dae4SAndroid Build Coastguard WorkerExample: 13*6236dae4SAndroid Build Coastguard Worker - --retry 7 $URL 14*6236dae4SAndroid Build Coastguard Worker--- 15*6236dae4SAndroid Build Coastguard Worker 16*6236dae4SAndroid Build Coastguard Worker# `--retry` 17*6236dae4SAndroid Build Coastguard Worker 18*6236dae4SAndroid Build Coastguard WorkerIf a transient error is returned when curl tries to perform a transfer, it 19*6236dae4SAndroid Build Coastguard Workerretries this number of times before giving up. Setting the number to 0 20*6236dae4SAndroid Build Coastguard Workermakes curl do no retries (which is the default). Transient error means either: 21*6236dae4SAndroid Build Coastguard Workera timeout, an FTP 4xx response code or an HTTP 408, 429, 500, 502, 503 or 504 22*6236dae4SAndroid Build Coastguard Workerresponse code. 23*6236dae4SAndroid Build Coastguard Worker 24*6236dae4SAndroid Build Coastguard WorkerWhen curl is about to retry a transfer, it first waits one second and then for 25*6236dae4SAndroid Build Coastguard Workerall forthcoming retries it doubles the waiting time until it reaches 10 26*6236dae4SAndroid Build Coastguard Workerminutes which then remains delay between the rest of the retries. By using 27*6236dae4SAndroid Build Coastguard Worker--retry-delay you disable this exponential backoff algorithm. See also 28*6236dae4SAndroid Build Coastguard Worker--retry-max-time to limit the total time allowed for retries. 29*6236dae4SAndroid Build Coastguard Worker 30*6236dae4SAndroid Build Coastguard Workercurl complies with the Retry-After: response header if one was present to know 31*6236dae4SAndroid Build Coastguard Workerwhen to issue the next retry (added in 7.66.0). 32