curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: print curl_easy_setopt in debug function

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 11 Jun 2018 11:20:56 +0200 (CEST)

On Fri, 8 Jun 2018, Tejas wrote:

>> If libcurl should do this, I think I'd argue for requiring some extra knob to
>> be turned on first before it gets sent to the debug callback/output.

> How about printing it with a new enum in curl_infotype::CURLINFO_OPTIONS, so
> people who want it can print it out and have their own switch for it.

I don't understand what you mean. Can you show with some psedo code or
something how to imagine that would work?

> I Experimented a bit by adding Curl_debug(...) to Curl_vsetopt(...) but it
> seems that it requires struct connectdata*, How could I get this data in
> Curl_vsetopt(...)?

You can't. curl_easy_setopt() is called before there is any connection.
Curl_debug() needs to be adjusted to be able to work without a struct
connectdata* pointer for this to work.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2018-06-11