Random Notes‎ > ‎

cURL "--retry" and "--continue-at -" : not quite what I had in mind

posted Jun 7, 2011, 6:05 PM by William Shallum   [ updated May 12, 2013, 7:12 PM ]
The cURL library doesn't inherently support looking at a file and continuing at its end. It only supports resuming at a specific offset (CURLOPT_RESUME_FROM_LARGE)  The --continue-at - or -C - option is processed by the command line application by looking at the file once at startup and getting the file size.

The command line application actually truncates the file to the initial size when retrying, this is a known bug (seemingly a bit low priority). 

Workaround

Retry from the calling batch file / shell script instead.
Comments