cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl_easy_perform() failed: Failure when receiving data from the peer

From: ravi kumar via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 4 Mar 2016 09:04:21 +0000 (UTC)

Hello sir,I am using the following line in my program and getting error, Error 411. The request must be chunked or have a content length.
        slist = curl_slist_append(slist,"feed: value");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist);
        curl_easy_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE);
        curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
        curl_easy_setopt(curl, CURLOPT_URL, url);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");

and when i add in program slist = curl_slist_append(slist, "Transfer-Encoding: chunked");So, it gives the following error.when compiling with  gcc -Wall -g test.c -lcurl -o testerror :
GnuTLS recv error (-9): A TLS packet with unexpected length was received.
 Closing connection 0
curl_easy_perform() failed: Failure when receiving data from the peer
and compiling with  gcc test.c $(pkg-config --libs --cflags libcurl) -o myprogramerror:
SSL read: error:00000000:lib(0):func(0):reason(0), errno 104
Closing connection 0
curl_easy_perform() failed: Failure when receiving data from the peer.Please let me know where i am doing wrong.
ThanksRavi

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-03-04