cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl -z option fails with ftp

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 5 Oct 2005 08:14:09 +0200 (CEST)

On Tue, 4 Oct 2005, Darryl House wrote:

> Oops... in the above test, the file on the server was actually updated, so
> the file fetch was warranted.

Thanks for all your details and accurate reports.

In general, this kind of problem with time-checked retrieval from an FTP
server happens because the MDTM's response is not properly defined in any spec
(it misses time zone etc).

But I just did a local test and tried -z, only to find out that the comparison
in the FTP code compared with < instead of <= which made it transfer the file
even if it has the exact same time stamp.

Looking at your output and time stamps, this could very well be what bites
you.

Here's the fix I just committed that fixes the problem in my end:

         http://cool.haxx.se/cvs.cgi/curl/lib/ftp.c.diff?r1=1.332&r2=1.333

(...and now, I'll write up some test cases for -z over ftp...)

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-10-05