cURL / Mailing Lists / curl-library / Single Mail

curl-library

DELELE occurence error later

From: M. Shinkaze <shinkaze75_at_gmail.com>
Date: Wed, 23 May 2012 13:29:02 +0200

Hi,

I am using libCurl for an applicatin which have to upload and download some
files and delete others. I use one unique easy handle (but using
curl_easy_reset and reconnect between each curl_easy_perform - persistent
handle)

a part of my code

curl_easy_setopt(Curl, CURLOPT_ERRORBUFFER, CurlErrorBuff);
headers = curl_slist_append(headers, "CWD /Temp");
headers = curl_slist_append(headers, "DELE FILE.txt");
m_CurlErrorCode = curl_easy_setopt(Curl, CURLOPT_POSTQUOTE, headers);
m_CurlErrorCode = curl_easy_perform(Curl);

the result of CURLOPT_ERRORBUFFER is
Curl error: 21 (QUOT string not accepted: DELE FILE.txt)
that fine I can handle it cause in some case the file doesnot exist

then : curl_easy_reset(Curl)

but just after on my source code, I trying to "reconnect":
CurlErrorCode = curl_easy_setopt(pCurl, CURLOPT_USERNAME, user);
CurlErrorCode = curl_easy_setopt(pCurl, CURLOPT_PASSWORD, passwd);
m_CurlErrorCode = curl_easy_perform(pCurl);
then here I got this error of CURLOPT_ERRORBUFFER is
Curl error: 23 (Failed writing body (299 != 1004)
I dont understand why, It seems I was deconencted by the server after the
DELETE error ?
or did I miss something osbvious ?

I am using libcurl/7.22.0 compiled with OpenSSL/0.9.8r & zlib/1.2.5 &
libssh2/1.3.0
on winXP

Thanks in advance

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