curl-library
Re: Set CURLOPT_FTP_FILEMETHOD to CURLFTPMETHOD_NOCWD does not work when changing dir
Date: Mon, 21 Nov 2011 15:52:36 +0100 (CET)
On Fri, 18 Nov 2011, Nuno Esculcas wrote:
> I'm having a little problem here accessing a ftp that does not allow me to
> access the root directory.
That seems like a server with a weird setup to me. It is hard to work with
such a beast.
> For this i use the CURLFTPMETHOD_NOCWD option in order to avoid commands
> like this CWD "/", or CURLFTPMETHOD_SINGLECWD in order to access directly to
> the ftp path.
That works for when libcurl is to change or not change directory to where it
is about to operate. But when a connection is re-used, libcurl will go back to
the original path first before trying the new path and in your case the
original path is "/"...
You can work around your stupid server by simply making sure you don't re-use
the connection for subsequent requests as then libcurl won't try to issue "CWD
/".
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-11-21