cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: how to disable logs for ftp delete using curl library

From: Michael Wood <esiotrot_at_gmail.com>
Date: Fri, 29 Jul 2011 18:27:52 +0200

On 29 July 2011 16:49, Arun venkatesh <arun.madupu_at_gmail.com> wrote:
> im using curl library windows version (curl-7.21.7-devel-mingw32), for
> performing various FTP operations from my application programme.
>
> issue on one such operation i would like to discuss about is with FTP delete..
> though delete works fine with the below statements, i see a lot of
> console logs essentially displaying the list of files in the
> folder,when ever curl tries to delete a file in that folder. though
> ive disabled the verbose option, im not sure how can i avoid these
> extra logs
>
> the code snippet is as follows
>
>                  string url = getUrl();
>          string command = "DELE " + filename;
>          struct curl_slist *headerlist=NULL;
>
>                  curl_easy_reset(m_curl);
>          curl_easy_setopt(m_curl, CURLOPT_URL, url.c_str());
>                  curl_easy_setopt(m_curl,CURLOPT_USERNAME,m_userName.c_str());
>                  curl_easy_setopt(m_curl,CURLOPT_PASSWORD,m_passWord.c_str());
>                  curl_easy_setopt(m_curl,CURLOPT_VERBOSE,0L);
>          headerlist = curl_slist_append(headerlist, command.c_str());
>          curl_easy_setopt(m_curl, CURLOPT_QUOTE, headerlist);
>          res = curl_easy_perform(m_curl);
>          curl_slist_free_all (headerlist);

Try setting CURLOPT_NOBODY.

-- 
Michael Wood <esiotrot_at_gmail.com>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-07-29