cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_URL always lists

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 21 May 2012 22:54:48 +0200

On Mon, May 21, 2012 at 06:47:55PM +0200, Anders Havn wrote:
> I'm just wondering if I'm doing something wrong or this is just how it
> works. I always set CURLOPT_URL to my base url, but then it also
> always lists the files and folders in the base url.

curl will always transfer a file unless explictly told otherwise. In the
case of sftp, if the URL points to a directory it will transfer a
directory listing as a file. If you want to avoid transferring a file
and just want the side effects instead (like deleting a file), use the
CURLOPT_NOBODY option.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-05-21