cURL / Mailing Lists / curl-library / Single Mail


Re: FTP large file support patch

From: Daniel Stenberg <>
Date: Tue, 16 Dec 2003 09:44:12 +0100 (CET)

On Mon, 15 Dec 2003, Dave Meyer wrote:

> I'll look into fixing the printf bits and progress function over the
> holidays -- since I have something accomplishing my needs at work, I can't
> really justify spending more time on these bits there. My further patches
> will be coming from, and probably won't be showing up for a
> week or two.

Ok, I did a little work on your patch in my end and attached is the patch made
against the latest CVS with some modifications needed due to source changes

Changes include:

 * no more sscanf() in libcurl with lld, only using strtoll()
 * removed all compiler warnings gcc produced

Still left to do:

 * verify/fix that the %lld in the printf lines works on platforms with a
   32bit off_t
 * don't blindly use strtoll() in libcurl code to convert string numbers to
   off_t, as all platforms may not have it. Platforms with 32bit off_t can
   use strtol() while platforms WITH >32bit off_t but without strtoll()
   (I can't name any but I bet they exist) need a separate implementation.

> I will, however, be spending time at work on the stuff to recognize broken
> server handling of the REST command for offsets above 2 GB. I'm going to
> add that as an additional part of this current patch, since it doesn't
> really apply to anyone who isn't also concerned about large files (well, at
> least, as far as I've seen -- all of the servers I've talked to support up
> to 2 GB REST just fine...).

Please keep that patch separate from the big file support. It will make it
easier to test and work on them separately. I assume that you will only do the
response parsing if the REST value given is larger than 2GB? That will address
the concern previously posted by Dominick Meglio.

> When I get back to the progress metering callback, though,

I've given this some more thoughts, and I say we leave the progress meter
callback out of this for now. It isn't strictly related and we can fix the
problems with that at a later time.

> I do have a question: Does the progress get cleared after each download for
> a multi-file download, or is it shown as the total progress across all
> downloads (and same question for uploads)? If it's the former, then I have
> no qualms about trying to store download/upload state in off_t's, since (as
> you mentioned) nobody who doesn't have large file support will be
> downloading anything over 2 GB.

The numbers are cleared and restarted for each single transfer.

    Daniel Stenberg -- --
   [[ Do not send mails to this email address. They won't reach me. ]]

This email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now!

Received on 2003-12-16