cURL / Mailing Lists / curl-library / Single Mail


Re: 答复: cancel upload in curl

From: Fabian Frank <>
Date: Wed, 19 Mar 2014 00:09:11 -0700

On Tue, Mar 18, 2014 at 10:32 PM, <> wrote:
> You mean return 0,it means the transfer is completed?

Please read It
"If you stop the current transfer by returning 0 "pre-maturely" (i.e before
the server expected it, like when you've said you will upload N bytes and
you upload less than N bytes), you may experience that the server "hangs"
waiting for the rest of the data that won't come."

 If I want to cancel the upload immediately, I should return

> 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?
Not without seeing the code that causes this problem. I am
using CURLOPT_READFUNCTION myself extensively, so I know it's generally
working fine. Are you setting up the form correctly using curl_formadd?


List admin:
Received on 2014-03-19