ftp remembers wrong prevpath
Date: Tue, 22 Nov 2005 13:58:25 -0500
Try this ftp test using libcurl
1. CWD to path_a and download an existing file_a.
2. CWD to path_b and try to download a non-existing file_b.
3. CWD to path_a and download (or upload) file_c.
Since step 2 fails, Curl_ftp_done is not called and ftp->prevpath still
remembers path_a. At step 3, libcurl thinks it is already at path_a but
really it is at path_b, therefore libcurl does not CWD to path_a and try
to download/upload file_c at path_b which is wrong.
My question is why libcurl sets ftp->prevpath in function Curl_ftp_done
instead of after every successful CWD?
Another interesting thing is that I logged into a Windows ftp server with
anonymous user. At step3 libcurl breaks the security and successfully
uploads file_c to path_b! If I do a normal uploading, the server denies.
Received on 2005-11-22