cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ftp problems

From: Ryan <meokid2_at_yahoo.com>
Date: Mon, 15 Jul 2013 00:07:02 +0800

On Jul 14, 2013, at 11:44 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Sat, 13 Jul 2013, Clemens Gruber wrote:
>
>> I have problems with a FTP transfer: It works with the verbose option set, but not without it.
>
> Which (lib)curl version is this? If not a recent version, I hope you've at least tried the latest one to see if the problem persists!
>
>> curl exits with: (19) RETR response: 502
>
> If you snoop on the connection with wireshark or similar, can you see anything wrong in curl's parsing of what the server responds? If the server does indeed return a 502 I don't think libcurl can do much about it!
>
>> 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“)
>
> An FTP server in 2013 that doesn't support SIZE rings a whole set of alarm bells in my head. It makes me suspect the problem is in the server end...

I have not once seen a modern server that doesn't support SIZE. Could Clemens tell us what platform his server is running on? If it's not the server, then he's certainly running some strange configuration.

>
>> Is this a bug in libcurl or a mistake on my side?
>
> I would guess neither, as libcurl does nothing differently with verbose enabled - or at least it shouldn't. It will only change the timing somewhat of when it does what.
>
>> 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?)
>
> Maybe you can show us that protocol analyze so that we can see what happened?
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

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