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":
https://github.com/curl/curl/blob/646cc574f0b72723906224824a57cd37ee88e9df/lib/http2.c#L553-L571

https://github.com/curl/curl/blob/646cc574f0b72723906224824a57cd37ee88e9df/lib/http2.c#L605-L606

https://github.com/curl/curl/blob/646cc574f0b72723906224824a57cd37ee88e9df/lib/http2.c#L738-L746



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.
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to