cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: reg:libucrl downloading zero byt file in FTP

From: Ben Combee <ben.combee_at_gmail.com>
Date: Tue, 24 Jun 2008 09:57:41 -0500

On Mon, Jun 23, 2008 at 11:04 PM, <nagarajan.sreenivasan_at_wipro.com> wrote:
> Hi all
>
> Yes the write callback is not getting called when the size of the file
> to be downloaded is zero bytes .
>
> Is this an expected behaviour or is there any mechanism to overcome it

You can solve this in your own code. Just store a flag that indicates
that the file has been opened. When you get the close notification,
ust open/close the file yourself if that flag hasn't been set. You
can make this dependent on getting a good HTTP response so you don't
create the file for error pages.
Received on 2008-06-24