curl-library
Re: Corrupted file after FTP download resume
Date: Wed, 21 Mar 2012 15:31:09 +0100
> On 21 Mar 2012, at 13:11 Tim Bannister <isoma_at_jellybaby.net> napisał(a):
>
> I would try adding a seek callback – suggested by http://curl.haxx.se/mail/archive-2012-02/0032.html
>
>
I added these two lines:
curl_easy_setopt(pCurl, CURLOPT_SEEKFUNCTION, fseek);
curl_easy_setopt(pCurl, CURLOPT_SEEKDATA, pFile);
No effect.
After further investigation I can reproduce the problem on my PC while I download file from the same FTP server via local network. I just need to unplug Ethernet cable from my PC for a while.
I tested it twice downloading file of size 113 431 347 B. In the first try I got:
- 50 197 928 B transferred until cable was removed
- 50 722 216 B is the beginning of incorrect block
- 109 966 759 B is the end of incorrect block
In the second try I got:
- 32 015 504 B transferred until cable was removed
- 32 539 792 B is the beginning of incorrect block
- 113 280 143 B is the end of incorrect block
So in both cases the offset between restart of transfer and the beginning of incorrect block is 524 288 B!!!
Regards
Marcin
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-03-21