cURL / Mailing Lists / curl-library / Single Mail


returning -1 from CURLOPT_READFUNCTION (was Re: curl-library Digest, Vol 91, Issue 58)

From: Daniel Stenberg <>
Date: Sat, 23 Mar 2013 13:46:13 +0100 (CET)

On Sat, 23 Mar 2013, subrahmanya wrote:

Please, don't top-post, don't full-quote and please use a sensible subject.

> Yes I've registered CURLOPT_READFUNCTION. The function returns value
> "(size_t) -1" when there is no more data to write.

You're supposed to return 0 then, as documented.

If it truly used to work back in the old days by returning -1 then you were
just lucky and you depended on undocumented behavior.

List admin:
Received on 2013-03-23