cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ftp upload problem

From: Nicky <nickyjian_at_yahoo.com.tw>
Date: Wed, 4 Jun 2008 14:14:59 +0800 (CST)

Message: 1
Date: Tue, 3 Jun 2008 09:30:21 +0200 (CEST)
From: Daniel Stenberg
Subject: Re: ftp upload problem
To: libcurl development
Message-ID:
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Tue, 3 Jun 2008, Nicky wrote:

> I run the example ftpupload.c http://curl.haxx.se/lxr/source/docs/examples/ftpupload.c in CentOS release 4.6 (Final)
> Kernel 2.6.9-67.EL on an i686,curl-devel-7.12.1-11.el4 but I get the failed result.The curl_easy_perform(curl) return 18.I find the error table that it means
> CURLE_PARTIAL_FILE (18) A file transfer was shorter or larger than
> expected. This happens when the server first reports an expected transfer
> size, and then delivers data that doesn't match the previously given size.

First, 7.12.1 is so old it's not even funny.

> But the file size equals the tranfer size.I don't know what's wrong.
> curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
> (curl_off_t)file_info.st_size);

Did you enable the LFS bits to get 64bit off_t when you compiled your app?
   
  It works ok when I enable LFS.Thanks.

       付費才容量無上限?Yahoo!奇摩電子信箱2.0免費給你,信件永遠不必刪! - 馬上體驗!
Received on 2008-06-04