cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: FTP SIZE command?

From: Armel Asselin <asselin.armel_at_wanadoo.fr>
Date: Mon, 7 Aug 2006 13:46:00 +0200

> On Mon, 7 Aug 2006, Armel Asselin wrote:
>
>> it seems that each download in FTP is preceded by a SIZE command and TYPE
>> I command. Is there a way to disable it? (I already know the size of the
>> file in fact, and the type rarely changes). I'm trying to reduce to the
>> strict minimum the number of round-trip involved by a FTP get command.
>
> No, there's no such way. You may know the size already but libcurl doesn't
> and it needs to know the size to properly detect transfers that are cut
> off prematurely.
is it imagineable to add an option such as "CUROPT_EXPECT_SIZE_LARGE"? which
would prevent this request?

I noted as well that curl redo all the CWD stuff for each file even if the
previously downloaded file was in the same directory (idem for TYPE A/I),
could it be possible/wishable to memorize in the curl FTP context that the
last download was in same path and/or same type? and redo the minimal stuff?
(potentially with something to disable this info, if the user want to mess
with the QUOTE stuff).

I want to make large number of small files downloads, these additional
roundtrips (wrt to a pure FTP lib) may degrade dramatically the
performances. I'm ready to implement them.

Armel
Received on 2006-08-07