cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLE_PARTIAL_FILE on ftp-upload?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 12 Feb 2008 22:10:45 +0100 (CET)

On Tue, 12 Feb 2008, Georg Lippitsch wrote:

> When I upload to a ftp-server and transfer is interrupted, sometimes I get
> CURLE_PARTIAL_FILE error. How can this happen on uploads?
>
> As documentation says: "This happens when the server first reports an
> expected transfer size, and then delivers data that doesn't match the
> previously given size."
>
> But on uploads, the server can't report an expected transfer size.
> CURLOPT_INFILESIZE is *not* set, and file size isn't even known when
> transfer starts.

As I read the code, the only other possibility is that the transfer is
completed (possibly prematurely then) and there's no 226 or 250 response from
the server within the given time restraints. See lib/ftp.c:ftp_done() for
details.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-02-12