cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ftp upload problem

From: Jean-Philippe Barrette-LaPierre <jpbarrette_at_savoirfairelinux.net>
Date: Thu, 31 Mar 2005 15:28:38 -0500

On March 31, 2005 02:45 pm, Geoffrey E. Quelch wrote:
> I am having problems implementing an ftp upload with curlpp, I am receiving
> the error: Uploaded unaligned file size (0 out of 732 bytes), if I remove
> the infile_size() call in the code, I don't get the error, but in both
> cases I get a zero length file on the server.
>

This post was originally posted on curlpp mailing-list, but I suggested to
post this message on curl-library since I thought that it's probably a
libcurl problem.

> The test ftpd server is a vanilla vsftpd installed on the same machine as
> the code is running. I can transfer files to the machine using the ftp
> command without a problem.
>
> Using verbose mode in my code, I get the following output (in the version
> where I don't call infile_size() ):
>
> * About to connect() to dozer:21
> * Connected to dozer (127.0.0.1) port 21
> 220 (vsFTPd 1.2.1)
>
> > USER deos
>
> 331 Please specify the password.
>
> > PASS ******
>
> 230 Login successful.
> * We have successfully logged in
>
> > PWD
>
> 257 "/home/deos"
> * Entry path is '/home/deos'
>
> > CWD deos
>
> 250 Directory successfully changed.
>
> > EPSV
>
> 229 Entering Extended Passive Mode (|||56962|)
> * About to connect() to dozer:56962
> * Connecting to dozer (127.0.0.1) port 56962
> * Connected the data stream with PASV!
>
> > TYPE I
>
> 200 Switching to Binary mode.
>
> > STOR 20050330225650.shef
>
> 150 Ok to send data.
> 226 File receive OK.
>
> > RNFR 20050330225650.shef
>
> 350 Ready for RNTO.
>
> > RNTO SUAPHLRR2PHI.dat
>
> 250 Rename successful.
> * Connection #0 left intact
> * Closing connection #0
>
> Environment: White Box Linux 3 (RedHat EL clone)
> curl-7.10.6-4.1
> curlpp-0.3.2-rc2 (compiled with gcc 2.96 as I am in an Oracle environment,
> and that is the compiler they require.)
>
> I used example 13 as a model for my code.
>
> What am I doing wrong?
>
> Thanks,
> GEQ

-- 
Jean-Philippe Barrette-LaPierre
Maintener of cURLpp (http://rrette.com/curlpp)
Received on 2005-03-31