-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Daniel Stenberg
Sent: Monday, November 16, 2009 4:38 PM
To: libcurl development
Subject: RE: Extra CWD in curl_easy on Windows

On Mon, 16 Nov 2009, Dave Galloway wrote:

> That looks very strange. What URL and what QUOTE options have you used to
> make it do this?

...

> curl_easy_setopt(curl, CURLOPT_URL, url);

So what does the URL look like?

> curl_easy_setopt(curl, CURLOPT_QUOTE, cmd_list);

And what does the cmd_list contain?

--

  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html


The cmd_list is empty just before the call to curl_easy_perform.
cmd_list is set to NULL, and no curl_slist_append() calls are made in this pass.


The URL is edi.smithdrug.com.

I found where the CWD is coming from.
ftpc->dirdepth is 1 and ftpc->dirs[] is '/' so it does a CWD /.
This is in ftp.c around line 855 (version 7.19.6).



      if(ftpc->dirdepth) {
        ftpc->count1 = 1;
        /* issue the first CWD, the rest is sent when the CWD responses are
           received... */
        NBFTPSENDF(conn, "CWD %s", ftpc->dirs[ftpc->count1 -1]);
        state(conn, FTP_CWD);
      }
      else {
        /* No CWD necessary */
        result = ftp_state_post_cwd(conn);
      }

I have not figured out why this needs to be called and was not called in the 
older libcurl.
I have gotten sidetracked but will get back to it this week hopefully.

Thanks,
Dave
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to