cURL / Mailing Lists / curl-library / Single Mail


ftp problems

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


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

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

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.


Best regards,

List admin:
Received on 2013-07-13