cURL / Mailing Lists / curl-library / Single Mail


Re: Re-init curl handle needed on errors?

From: Daniel Stenberg <>
Date: Mon, 12 Nov 2001 15:53:07 +0100 (MET)

On Mon, 12 Nov 2001, Cadime wrote:

> I am repeatedly doing the sequence a operations using the same CURL handle
> (libcurl)
> A) NLST a directory, using CURLOPT_CUSTOMREQUEST option
> B) Getting files from that directory
> All seems to work under normal conditions.
> When a directory is empty, A) returns CURLE_FTP_COULDNT_RETR_FILE and B) is
> not executed ( I force that)

> However, when it tries to execute A) again if fails with FTP Access
> Do I need to curl_easy_init() my handle in these circunstances?

It seems like it could be a bug. Calling *perform() should not be dependent
on if a previous call to it worked fine or not.

Can you show use a protocol dump on this? When you set CURLOPT_VERBOSE to 1?
Or can you single-step into the library when you do the second NLST request
to see more specificly what fails? (There are only two different ftp commands
that can return that error code, USER and CWD.)

    Daniel Stenberg -- curl groks URLs --
Received on 2001-11-12