cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cancel upload in curl

From: Fabian Frank <fabian.frank.de_at_gmail.com>
Date: Tue, 18 Mar 2014 21:00:53 -0700

On Tue, Mar 18, 2014 at 7:28 PM, jy_lizl_at_cn.fujitsu.com <
jy_lizl_at_cn.fujitsu.com> wrote:

> I register read callback, but it hasn't be called.
> I think when read callback return 0,the transfer will be caceled.is it
> right?
>

Please refer to http://curl.haxx.se/libcurl/c/curl_easy_setopt.html, which
states that "The read callback may return CURL_READFUNC_ABORT to stop the
current operation immediately, resulting in a CURLE_ABORTED_BY_CALLBACK
error code from the transfer". You should not return 0 to abort a transfer.

Regards,
Fabian

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