cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Daniel Stenberg <daniel_at_haxx.se>
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.

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