curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

libcurl multi - PUSHFUNCTION callback

From: Jonathan Cardoso via curl-library <>
Date: Thu, 25 Jun 2020 22:07:50 -0300

Hi everyone.

From looking at the source code related to the CURLMOPT_PUSHFUNCTION callback, looks like there is no way to signal libcurl to cancel the request with an error from inside it, is that the case? 

The value returned from the callback is simply "ignored":

Is that by design?

Context: I'm adding this option to the Node.js bindings of libcurl (node-libcurl), and I need to handle the scenario where the binding user's callback throws an error. Currently looks like the only thing that can be done is to DENY the pushed frame, but I wanted to cancel the connection and return an error to the user (curl_multi_info_read data.result would give me something other than CURLE_OK).

Thanks in advance for any help.

Received on 2020-06-26