cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: problem in ftp/ssl "LIST " operation

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 16 Jan 2007 22:23:34 +0100 (CET)

On Mon, 15 Jan 2007, Kumar Swamy. Bhatt wrote:

> But During LIST operation I am observing that curl gets into an infinite
> loop. LIST operation goes fine if there are any relevant files matching the
> input file specification. Problem arises when there is no file matching the
> input file and server returns nothing. Here curl complains that connection
> is died and retry with a fresh connect.

That certainly sounds like a bug.

> Am I using curl in a wrong way?? Any help would be GREATLY appreciated.

> strcpy(bufCustomCommand,"LIST ");
> strncat(bufCustomCommand,pFileSpec,MAX_FILE_PATH_LENGTH);
> bufCustomCommand[5+strlen(pFileSpec)] = '\0';
> curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, bufCustomCommand);

While not strictly wrong, it is overly complicated. If you would just append a
slash to the URL, libcurl would do the LIST all by itself without you trying
hard to make it do it.

Although it probably doesn't fix the problem you see, since that is probably a
bug where libcurl is a bit too keen to think of a zero-byte transfer as a
problem instead of just an indication of perfectly valid no content.

We need to work on a fix...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-01-16