cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: size not being reset?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 28 Jan 2003 17:30:55 +0100 (CET)

On Mon, 27 Jan 2003, Dave Halbakken wrote:

> I am getting a CURLE_PARTIAL_FILE error code where I don't expect it. The
> attached file is a distillation of a C++ program I'm working on. At line 89
> of my attached test.c, I get CURLE_PARTIAL_FILE as a return code from
> curl_easy_perform. It looks as if curl retains the file size from the
> previous transfer, then at line 609 of lib\ftp.c executes the following
> code:
>
> if((-1 != conn->size) && (conn->size != *ftp->bytecountp) &&
> (conn->maxdownload != *ftp->bytecountp)) {
> failf(data, "Received only partial file: %d bytes",
> *ftp->bytecountp);
> return CURLE_PARTIAL_FILE;
>
> conn->size is non-zero, but *ftp->bytecountp is zero, so the code
> returns CURLE_PARTIAL_FILE.

I'm not really seeing the flow. The conn->size is set to -1 in Curl_Tranfer()
which should've been called before any new transfer has been initiated.

What FTP commands were the last ones sent in this connection before it
returned the error?

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
Received on 2003-01-28