curl-library
Re: CURLOPT_VERBOSE and curl_multi_cleanup()
Date: Thu, 9 May 2019 02:54:33 -0400
On 5/8/2019 6:27 AM, Kristoffer Gleditsch (kgledits) via curl-library wrote:
> We are using libcurl and multi handles in an application where we want
> debugging output and control over where that output is sent. We do
> this by setting CURLOPT_VERBOSE and CURLOPT_DEBUGFUNCTION, which sends
> all the output to our logging code.
>
> After https://github.com/curl/curl/pull/3618 and
> https://github.com/curl/curl/pull/3598, we started getting '* Closing
> connection 0' messages on STDERR when curl_multi_cleanup() closes the
> connections in the connection cache. This is because the verbose flag
> is copied to the closure_handle but fdebug etc. are not. The reason
> for this is pretty well explained in
> https://github.com/curl/curl/pull/3598#issuecomment-466301175 , but
> the result is that we have no way controlling where the verbose output
> from the closure_handle goes.
>
> One workaround is to add and remove a dummy easy_handle with
> CURLOPT_VERBOSE=0 before doing curl_multi_cleanup(); this will at
> least silence the output on STDERR. But should there be a proper
> interface for controlling this?
There's no way for the user to set options for the conncache closure
handle. Very few options can be safely inherited. I've proposed
reverting the change due to the issue you described. [1]
[1]: https://github.com/curl/curl/pull/3856
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-05-09