curl-library
Re: ftp problems
Date: Sun, 14 Jul 2013 17:44:56 +0200 (CEST)
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...
> 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
Received on 2013-07-14