cURL / Mailing Lists / curl-library / Single Mail


Re: Slight bug in the c/c++ API (or maybe just docs)

From: Daniel Stenberg <>
Date: Sun, 9 Dec 2001 10:29:26 +0100 (MET)

On Fri, 7 Dec 2001, Ben Greear wrote:

> The CURLOPT_READFUNCTION documentation talks about returning a -1 on
> error, but size_t is unsigned (at least on RH 7.2 Linux)
> Maybe you want ssize_t arguments??

The docs is not correct. Returning 0 will signal error. If fact, returning
anything but the size given to the function through the input arguments will
cause libcurl to abort the transfer.

    Daniel Stenberg -- curl groks URLs --
Received on 2001-12-09