cURL / Mailing Lists / curl-library / Single Mail


答复: cancel upload in curl

From: <>
Date: Wed, 19 Mar 2014 05:32:20 +0000

To Fabian

Thanks for your reply.
You mean return 0,it means the transfer is completed?
If I want to cancel the upload immediately, I should return CURL_READFUNC_ABORT.
Thanks for above.

And I have a trouble that xmlhttprequest upload by cUrl ,it doestn’t call read callback although I register callback to curl handle.
Do you have any idea?

Thanks again.

发件人: curl-library [] 代表 Fabian Frank
发送时间: 2014年3月19日 12:01
收件人: libcurl development
主题: Re: cancel upload in curl

On Tue, Mar 18, 2014 at 7:28 PM,<> <<>> wrote:
I register read callback, but it hasn't be called.
I think when read callback return 0,the transfer will be<> it right?

Please refer to, 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.


List admin:
Received on 2014-03-19