cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Failed writing body (-1 != 16384)

From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 11 Mar 2015 02:15:03 -0400

On 3/10/2015 11:41 PM, 鍏板ぉ wrote:
> Thanks for answering,I use libcurl 7.36,
> in the callback function ,
> size_t write_callback(char *ptr, size_t size, size_t nmemb, void
> *userdata);
> all the type I use is unsigned int,does that lead to the Failed
> writing body (-1 != 16384) ?
>

Please do not top-post [1]. I don't know why you'd see -1 because in the
version of libcurl you claim to be using the format specifier is %zu [2]
and that should print an unsigned integer not -1. Maybe someone else on
the list can shed some insight on what could be happening there. Try
getting the version string dynamically to see which libcurl is actually
being used:

     printf("%s\n",curl_version_info(CURLVERSION_NOW)->version);

If you need more help please do what I said in my previous e-mail. Also
can you post your write callback function?

[1]: http://curl.haxx.se/mail/etiquette.html#Do_Not_Top_Post
[2]: https://github.com/bagder/curl/blob/curl-7_36_0/lib/sendf.c#L459

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-03-11