cURL / Mailing Lists / curl-users / Single Mail

curl-users

File transfer without end

From: Ivan Boscaino <iboscaino_at_mbigroup.it>
Date: Tue, 12 Sep 2006 16:54:46 +0200

Hi all,

I downloaded curl 7.15.4 for Windows (XP) and tried to upload a file of 240 MB
to an FTP server (it lasts about 40 minutes).
When the progress bar reaches 100%, the uploaded file on the server is ok but on
the client the control doesn't return to the shell and curl continues to write
"100%".

The output of "curl -V" is:
curl 7.15.4 (i586-pc-mingw32msvc) libcurl/7.15.4 OpenSSL/0.9.7e zlib/1.2.2
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: Largefile NTLM SSL SSPI libz

I'm using the following command:
curl -v -m 800000 -# -T 1.zip ftp://xxx:xxx@xxx.xxx.xxx/

Here the curl log:

* About to connect() to x.x.x.x port 21
* Trying x.x.x.x... connected
* Connected to x.x.x.x (x.x.x.x) port 21
< 220 Welcome to XXX FTP service.
> > USER test
< 331 Please specify the password.
> > PASS xxx
< 230 Login successful.
> > PWD
< 257 "/"
* Entry path is '/'
> > EPSV
* Connect data stream passively
< 229 Entering Extended Passive Mode (|||64012|)
* Trying x.x.x.x... connected
* Connecting to x.x.x.x (x.x.x.x) port 64012
> > TYPE I
< 200 Switching to Binary mode.
> > STOR 1.zip
< 150 Ok to send data.
                                                                           0,0%
[CUT]
####################################### 55,4%
[CUT]
######################################################################## 100,0%
######################################################################## 100,0%
[CUT: curl continues to write the last line forever...]

Here the server log. It seems that curl doesn't catch the end of the protocol:

Tue Sep 12 13:39:50 2006 [pid 24802] CONNECT: Client "x.x.x.x"
Tue Sep 12 13:39:50 2006 [pid 24802] FTP response: Client "x.x.x.x", "220
Welcome to XXX FTP service."
Tue Sep 12 13:39:50 2006 [pid 24802] FTP command: Client "x.x.x.x", "USER test"
Tue Sep 12 13:39:50 2006 [pid 24802] [test] FTP response: Client "x.x.x.x", "331
Please specify the password."
Tue Sep 12 13:39:50 2006 [pid 24802] [test] FTP command: Client "x.x.x.x", "PASS
<password>"
Tue Sep 12 13:39:50 2006 [pid 24801] [test] OK LOGIN: Client "x.x.x.x"
Tue Sep 12 13:39:50 2006 [pid 24803] [test] FTP response: Client "x.x.x.x", "230
Login successful."
Tue Sep 12 13:39:50 2006 [pid 24803] [test] FTP command: Client "x.x.x.x", "PWD"
Tue Sep 12 13:39:50 2006 [pid 24803] [test] FTP response: Client "x.x.x.x", "257
"/""
Tue Sep 12 13:39:50 2006 [pid 24803] [test] FTP command: Client "x.x.x.x", "EPSV"
Tue Sep 12 13:39:50 2006 [pid 24803] [test] FTP response: Client "x.x.x.x", "229
Entering Extended Passive Mode (|||64012|)"
Tue Sep 12 13:39:50 2006 [pid 24803] [test] FTP command: Client "x.x.x.x", "TYPE I"
Tue Sep 12 13:39:50 2006 [pid 24803] [test] FTP response: Client "x.x.x.x", "200
Switching to Binary mode."
Tue Sep 12 13:39:50 2006 [pid 24803] [test] FTP command: Client "x.x.x.x", "STOR
1.zip"
Tue Sep 12 13:39:50 2006 [pid 24803] [test] FTP response: Client "x.x.x.x", "150
Ok to send data."
Tue Sep 12 14:21:50 2006 [pid 24803] [test] OK UPLOAD: Client "x.x.x.x",
"/1.zip", 241985776 bytes, 93.77Kbyte/sec
Tue Sep 12 14:21:50 2006 [pid 24803] [test] FTP response: Client "x.x.x.x", "226
File receive OK."
Received on 2006-09-12