curl-library
Re: EPSV vs PASV
Date: Wed, 19 Jan 2011 08:40:37 +0100 (CET)
On Wed, 19 Jan 2011, Leo wrote:
> By default, libcurl always tries EPSV first, then PASV. However, some FTP
> sites don't like EPSV and it's impossible to connect unless you disable it.
Such servers are completely broken. libcurl attempts to disable EPSV when it
gets a problem with it and retries with PASV instead.
Completely broken servers don't act reasonably so it is hard to come up with
reasonable ways to work with them. But of course, if anyone has ideas for
improvements then let's discuss them!
> So what approach should be used to be able to connect to any site?
libcurl has a sensible default approach IMHO.
> Is there a way to query FTP site for preferred command before setting an
> appropriate libcurl option?
I think the problem isn't always in the particular FTP server but in middle-
boxes along the way. The firewall/NAT on the client side and the firewall/load
balancer/whatever on the server side. As FTP needs them to be state aware to
function perfectly, some old and broken ones will mess up on commands they
don't understand. EPSV has only existed in an RFC since 1998 after all! B)
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-01-19