cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: reg resume download

From: kuriakose <kuriakose_at_huawei.com>
Date: Fri, 05 Jan 2007 09:49:44 +0530

 Hi ,
        Thanks for the reply.
So we need to store the last modified server time along with the partially
downloaded file. But this has to be in a sepearate file along with the main
file . Hope what I got is correct.
Thanks once again.

 
 

Regards
Kuriakose
 
 

 

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Dan Fandrich
Sent: Friday, January 05, 2007 2:02 AM
To: 'libcurl development'
Subject: Re: reg resume download

On Thu, Jan 04, 2007 at 11:37:43AM +0530, kuriakose wrote:
> Suppose we have partially downloaded 1.5 MB of a file of size 2
MB( in
> server) .
>
> But in the server the file is modified but still 2MB or more.
>
> Now if we try to resume download the integrity of the file will be lost.
>
> One solution is to get the modification time of file in server and compare
with
> the creation time of file partially downloaded.
>
> But for this the time of the 2 machines should be synchronized .

They don't need to be synchronized--you just need to store the
Last-Modified:
header for this entity and compare it the next time you retrieve the file.

> So is there any solution for this.

A better solution would be to use the ETag: header to determine if the file
has changed. This is valid on HTTP only, of course.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-01-05