cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

regard CURLOPT_NOBODY

From: guoji Ma <guoji.ma_at_gmail.com>
Date: Mon, 25 Oct 2010 17:03:03 +0800

hi, what means to
CURLOPT_NOBODY<http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTNOBODY>
 ?
I am writing a program that delete a file in the ftpd.
as follows:
  curl_easy_reset(curl);
  curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, bug);
 curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
  //curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
 curl_easy_setopt(curl, CURLOPT_NOBODY, 0);

snprintf(ftplink, USERNAME+PASSWORD+16, "ftp://%s:%s@%s%s",
  para->uname, para->password,
para->host, para->rdir);
curl_easy_setopt(curl, CURLOPT_URL, ftplink);

snprintf(command, FILENAME+6, "DELE %s", filename);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, command);

res = curl_easy_perform(curl);
if(res != CURLE_OK)
    printf("%s\n", bug);

when I set CURLOPT_NOBODY<http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTNOBODY>
to
0, the bug is "RETE response 250" and filename is deleted;
when i set CURLOPT_NOBODY<http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTNOBODY>
to
1, the bug is empty, but the filename didn't deleted.
why? how to set the
CURLOPT_NOBODY<http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTNOBODY>
so
that the res is CURLE_OK?
thanks!

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-10-25

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET