cURL / Mailing Lists / curl-library / Single Mail

curl-library

FTP getting empty file.

From: Alexander Krasnostavsky <ALEXANDERKR_at_Amdocs.com>
Date: Sun, 15 Aug 2004 14:59:14 +0300

Hi,
When getting an empty file while using CURLOPT_WRITEFUNCTION option,
there is no call of write function because it is stopped in line 293 in
lib/transfer.c:

       /* if we receive 0 or less here, the server closed the connection
and
           we bail out from this! */
        else if (0 >= nread) {
          k->keepon &= ~KEEP_READ;
          FD_ZERO(&k->rkeepfd);
          readdone = TRUE;
          break;
        }

In this case the empty file does not created in client host.
When 0 bytes received, the case should distinguish between the first
time and others, so for the first time the write function should be
called with 0 bytes just to create an empty file.

What do you think?

The information contained in this message is proprietary of Amdocs,
protected from disclosure, and may be privileged.
The information is intended to be conveyed only to the designated recipient(s)
of the message. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, use, distribution or copying of
this communication is strictly prohibited and may be unlawful.
If you have received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.
Thank you.
Received on 2004-08-15