cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: FTP CWD problem introduced with 7.11.x

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Sat, 24 Apr 2004 11:00:10 +0200 (CEST)

On Fri, 23 Apr 2004, Ridley, John wrote:

> The new method that curl uses to CWD for FTP transfers seems to me to be
> ill-advised.
>
> Specfically, when it tries to work in a directory /foo/bar/, it now tries to
> CWD to foo, and then to bar.
>
> The old behavior was to just CWD to foo/bar/ all in one step.

However bad this might work for you, it is how RFC1738 tells us how to access
directories given in a URL. There are also cases in which the former approach
don't work.

> This does not work for me, because I do not have access to get into the
> directory /foo. As soon as that is tried, it fails and that's the end.

But if you cannot CWD into foo, how can the system allow you to CWD into
foo/bar?

> It appears that the reason for the change is so that curl can create the
> whole directory tree if needed, by stepping there one directory at a time.

No, that feature was added several months afterwards and could indeed be
supported no matter how the CWD commands are sent.

> I've put in a hack on my local lib/ftp.c to just paste ftp->dirs[] back into
> one string and do the CD. However, I do not submit that this is the answer;
> I only want to point out that the current method has problems, and deserves
> some thought.

Can you describe for us how this situation happens? Perhaps we could work out
some heuristics to attempt the full-path CWD in case the single-part CWD
fails...

> BTW, if I see issues with the source code, where should I send them? Here,
> or somewhere else? I didn't see a developers list. I came across some
> odd-looking code and would like to mention it to someone.

You can send them here, sure, but the main libcurl (which is the majority of
the code) development and talk is kept on the curl-library mailing list:

        http://cool.haxx.se/mailman/listinfo/curl-library

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-04-24