cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Why curl does CWD (was Re: Problem with subsequent persistantcalls)

From: Dimitris Sarris <dsar_at_intracom.gr>
Date: Fri, 07 Dec 2001 15:30:34 +0200

Daniel Stenberg wrote:

> On Fri, 7 Dec 2001, Dimitris Sarris wrote:
>
> > Of course, you can optimize it, but even if I give a relative path, it
> > first tries to CWD to the directory I give my request (of course it
> > fails). Thus, I believe that the bug must be solved first, and then
> > optimize the code. :-)
>
> Can you make this problem appear with the command line client?
>
> I really can't see how the code can do wrong. Check the lib/ftp.c code, it is
> just so easy to follow and clean. Allow me to paste it here:
>
> << ftp.c>> -- snip --
>
> See? First it performs all the quoted commands, then it switches back to the
> entry path from the first connection, then it changes to the transfer
> directory.
>
> Or can you tell me where I'm wrong?

OK.
I got it wrong. My goal is to perform a CWD command and then retrieve the listing
of the directory.
That's why, I performed a CWD command with the CURLOPT_QUOTE and then performed
the connection.
With your explanation, my implementation is not valid.

How can I perform the directory listing of a directory except for the HOME?
Why did you implement it like this? I suppose that it should be more suitable to
first perform the CWD to home,
then the quoted commands and last the transfer.

Thanks,
Dimitris
Received on 2001-12-07