cURL / Mailing Lists / curl-library / Single Mail

curl-library

FTP Upload with Unix customers (solaris, Redhat 6.2, Hp10.2, HP11, ...)

From: <christophe.legry_at_orsyp.com>
Date: Wed, 16 Mar 2005 15:47:26 +0100

Hello,
 
 
The upload of ascii file with unix customers return an error 18 at the end :
* Trying 192.168.1.16... * TCP_NODELAY set
* connected
* Connecting to 192.168.1.16 (192.168.1.16) port 33292
* Connected the data stream with PASV!
> TYPE A
< 200 Type set to A.
> STOR upload.txt
< 150 ASCII data connection for upload.txt (192.168.1.9,55083).
* Remembering we are in dir /export/home/testftp/
* Uploaded unaligned file size (1154730 out of 8646664547271286442 bytes)
* Closing connection #0
>>>uxput command return error code Curl : 18

The message "Uploaded unaligned file size" is returned by Curl_ftp_done function (./lib/ ftp.c).
Il the CRLF option is set, Upload is successfully !
 
 
The code of this control is :
  if(data->set.upload) {
    if((-1 != data->set.infilesize) &&
       (data->set.infilesize != *ftp->bytecountp) &&
       !data->set.crlf) {
      failf(data, "Uploaded unaligned file size (%" FORMAT_OFF_T
            " out of %" FORMAT_OFF_T " bytes)",
            *ftp->bytecountp, data->set.infilesize);
      conn->bits.close = TRUE; /* close this connection since we don't
                                  know what state this error leaves us in */
      return CURLE_PARTIAL_FILE;
    }
  }

I think the Unix FTP server returned an status OK for the SIZE command before upload...
 
 
C. Legry
 
Received on 2005-03-16