curl-users
Re: Wrong file status if downloaded is continued
Date: Thu, 7 Oct 2010 23:49:57 +0530
Daniel Stenberg, thanks for a quick reply. Basically, I am downloading
a big file using differnet interfaces. NOw, my strategy is to divide
file into various parts by reading CONTENT HEADER and then dividing
file into small parts..
Now, problem is that sometimes site doesnt respond or I have a faulty
connection. So, download breaks sometimes. How do I go about solving
that problem?
Other download managers like "wget -c" option. Whats the equivalent in
curl for that?
On Thu, Oct 7, 2010 at 11:34 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Thu, 7 Oct 2010, Abhijeet Rastogi wrote:
>
>> The files have different STAT when download is paused.
>
> You don't "pause", you stop the download and make another resumed download
> again later.
>
>> shadyabhi_at_ArchLinux /tmp $ curl --range 0-40000 -C -
>
> curl should probably warn you about this, but what exactly are you asking
> here? A range or resume from? --range and -C are at least partly mutually
> exclusive and I don't understand what you want it to do.
>
>> ** Resuming transfer from byte position 20480
>
> See, the first download got 20480 bytes when you stopped it and now it
> continues there. The -C has effect, the --range is ignored/overridden.
>
>> % Total % Received % Xferd Average Speed Time Time Time
>> Current
>> Dload Upload Total Spent Left
>> Speed
>> 100 36544 100 36544 0 0 1988 0 0:00:18 0:00:18 --:--:--
>> 3769
>
> ... so it downloaded 36544 bytes in the second download.
>
>> Size: 57024 Blocks: 112 IO Block: 4096 regular file
>
> Exactly. 20480 + 36544 = 57024
>
>> So, size is 57024 which should be 40001 as I downloaded only that much
>> data.
>
> You may have wanted to only download that, but you didn't ask for only that.
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
>
-- Abhijeet Rastogi http://www.google.com/profiles/abhijeet.1989 ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-10-07