cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: reg resume download

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 4 Jan 2007 12:31:47 -0800

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-04