cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problem with subsequent persistant calls

From: Dimitris Sarris <dsar_at_intracom.gr>
Date: Fri, 07 Dec 2001 14:29:44 +0200

Hello,

I use the the CURLOPT_QUOTE option in order to perform a 'CWD' command
in order to list the files of a specific directory (not home directory).

I perform these requests twice, using the persisting feature of libcurl
(keep the same connection).
The first listing is performed with no problem. However, the second
listing is performed for the home directory and not for the directory I
request in my 'CWD' command.
As you can see at the output of my program (using VERBOSE mode), after
my 'CWD' command, libcurl performs also a 'CWD' to the home directory.
Is this the correct behavior?

OUTPUT
----------

< 220 myserver FTP server (Version 4.1 Fri Feb 12 13:15:17 CST 1999)
ready.
> USER jim
< 331 Password required for jim.
> PASS jim123
< 230 User jim logged in.
* We have successfully logged in
> PWD
< 257 "/home/users/jim" is current directory.
* Entry path is '/home/users/jim'
* Connected to myserver.myintranet.gr (146.124.111.10)
> CWD /tmp (1st listing)
< 250 CWD command successful.
> PASV
< 227 Entering Passive Mode (146,124,111,10,131,174)
* Connecting to 146.124.111.10 (146.124.111.10) port 33710
* Connected the data stream!
> TYPE A
< 200 Type set to A; form set to N.
> NLST
< 150 Opening data connection for ..
* Getting file with size: -1
< 226 Transfer complete.
* Connection #0 left intact
* Re-using existing connection! (#0)
* Connected to myserver.myintranet.gr(146.124.111.10)
> CWD /home/users/jim/tmp (2nd listing)
< 250 CWD command successful.
> CWD /home/users/jim (WHY????)
< 250 CWD command successful.
> PASV
< 227 Entering Passive Mode (146,124,111,10,131,175)
* Connecting to 146.124.111.10 (146.124.111.10) port 33711
* Connected the data stream!
> TYPE A
< 200 Type set to A; form set to N.
> NLST
< 150 Opening data connection for ..
* Getting file with size: -1
< 226 Transfer complete.
* Connection #0 left intact
* Closing connection #0
--------------------------------------------------------

Thanks,
Dimitris
Received on 2001-12-07