cURL / Mailing Lists / curl-library / Single Mail


Re: A question about the default LIST after USER, PASS

From: Daniel Stenberg <>
Date: Wed, 25 Aug 2010 09:11:20 +0200 (CEST)

On Wed, 25 Aug 2010, Mehmet Bozkurt wrote:

> As I understand this will be performed if a server URL ends with '/'.
> However, the URL I provide to libcurl is "ftp://localhost", not ending with
> '/'

Right, but in that case the slash is implied (and added internally) so it is
in all effects a trailing slash as well. Perhaps we should clarify that better
in the docs.

libcurl is made for transfers, and with FTP it will by default either get a
file or get a directory listing. A trailing slash is thus a directory list,
and all other cases get a file.

> I disable the data callback with CURLOPT_NOBODY=1.

It is the correct way. CURLOPT_NOBODY doesn't only disable the data callback,
it actually doesn't even ask for the "body" then (and that would be the
directory's or the file's contents).

> P.S This is my first post on a mailing list such as this and if I'm not
> adhering to mail etiquette or if this is'nt the right forum for my question,
> please correct me.

It looks great!

List admin:
Received on 2010-08-25