cURL / Mailing Lists / curl-library / Single Mail

curl-library

ftp problems

From: Clemens Gruber <clemens.gruber_at_pqgruber.com>
Date: Sat, 13 Jul 2013 01:16:11 +0200

Hello,

I have problems with a FTP transfer: It works with the verbose option set, but not without it.

With the curl tool, the following works:
curl -v -o testfile —disable-eprt -P - —user usr:pw ftp://192.168.0.100/testfile

But this doesn’t:
curl -o testfile —disable-eprt -P - —user usr:pw ftp://192.168.0.100/testfile

curl exits with: (19) RETR response: 502

Maybe I should mention that my ftp server does not support the SIZE command, but in the log I see that curl obtains the size with/after the RETR command (debug message: "Getting file with size: 42000“)

Is this a bug in libcurl or a mistake on my side?

In Wireshark I saw, that libcurl is sending a "SIZE testfile“ command three times, each time followed by a „RETR testfile“ command. (Maybe the download is finished after that, because I see a QUIT sent to the server, but even if the file was downloaded successfully, without the -v, curl seems to throw the content away?)

I hope, some of the curl developers, who wrote the ftp.c code, can give me some hints, why this is happening / not working without -v

In the end, I want to download this file from my C application, with libcurl as its only dependency. I only used the curl command-line-tool to show this behavior in a more standardized way.

Thanks.

Best regards,
Clemens

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-07-13