> -----Ursprungligt meddelande----- > Från: [email protected] [mailto:curl-library- > [email protected]] För Daniel Stenberg > Skickat: den 26 augusti 2010 19:07 > Till: libcurl development > Ämne: Re: Odd behaviour for CWD and CURLFTPMETHOD_MULTICWD > > On Thu, 26 Aug 2010, Mehmet Bozkurt wrote: > > > My question is why libcurl tries to do the following: > > ... > > CWD /ftp/ftpdbg > > ... > > CWD ftp > > ... > > CWD ftpdbg > > Only one of these dirs exist and the second causes an error. > > See listing below. > > > > I am trying to upload a file to: > > ftp://localhost/ftp/ftpdbg/MyTestContract/remote.txt > > What libcurl version? > > Further, your output shows the output from two requests, one that first > connects and completes and then the subsequent that fails. Can you show > us the > full URLs you used for both requests? > > > * Entry path is '/ftp/ftpdbg' > > * Remembering we are in dir "" > > > * Connected to localhost (127.0.0.1) port 21 (#0) > >> CWD /ftp/ftpdbg > > The initial CWD to the "Entry path" happens when libcurl determines > that you > don't want to use the same directory as immediately before - and the > new path > you've given is relative the entry path. It then switches back first, > to then > CWD to the requested directory. > > Perhaps you can give us a full example against a public FTP site or > something > that repeats the problem? > > -- > > / daniel.haxx.se > ------------------------------------------------------------------- > List admin: http://cool.haxx.se/list/listinfo/curl-library > Etiquette: http://curl.haxx.se/mail/etiquette.html
Thanks for your reply Daniel! I am currently using a build of curl-7.21.1. I think I was confusing libcurl by using the fullpath of ftp://localhost/ftp/ftpdbg/MyTestContract/remote.txt when doing my upload, instead of using ftp://localhost/MyTestContract/remote.txt (although the entry dir is /ftp/ftpdbg), which works better. I was storing the entry path of "/ftp/ftpdbg" and adding it to my url when doing the upload. I thought it was necessary to supply the whole absolute path. On a side note I think the docs for WILDCARDMATCH should be updated to state that using DIRLISTONLY 1 will prevent a correct file list being returned, due to the behavior of Curl_ftp_parselist, in ftplistparser.c. Curl_ftp_parselist expects a dir listing in "extended" format (ls -l) and not just a list of file names. /Mehmet. ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
