> On Mon, Jun 04, 2018 at 03:13:47PM -0400, Tejas wrote:
> 
> > Does anybody else think that printing out the options(curl_easy_setopt) via 
> > debug function (or -v) will be helpful?
> 
> You mean like the --libcurl option?
> 
> > I had to recently debug a libcurl application which I didn't have the 
> > source code for and felt that these logs would be useful.
> > 
> > I have a temp hack with LD_PRELOAD so it only works on linux.
> > 
> > An example might look like this
> > 
> > ....
> > 
> > curl_easy_setopt(0xptr, CURLOPT_URL, https://duckduckgo.com/)
> > 
> > curl_easy_setopt(0xptr, CURLOPT_NOPROGRESS, 1)
> > 
> > curl_easy_setopt(0xptr, CURLOPT_NOBODY, 1)
> > 
> > curl_easy_setopt(0xptr, CURLOPT_HEADER, 1)
> > 
> > ...
> > 
> > curl_easy_setopt(0xptr, CURLOPT_USERAGENT, curl/7.55.1)
> > 
> > curl_easy_setopt(0xptr, CURLOPT_MAXREDIRS, 50)
> > 
> > curl_easy_setopt(0xptr, CURLOPT_POSTREDIR, 0)
> > 
> > ...
> 
> That's exactly what --libcurl does. It's only available in the curl
> 
> command-line tool so it won't work on arbitrary libcurl-using applications, 
> but
> 
> it sounds like that may be what you're looking for.
> 
> > > > Dan
> 
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
> 
> Etiquette: https://curl.haxx.se/mail/etiquette.html

The --libcurl is interesting and i didn't know this before, but that is not 
what I meant, unless it has a CURLSETOPT_LIBCURL or something similar (which i 
couldn't find)

What I actually wanted was to print out setopt via CURLOPT_DEBUGFUNCTION , 
under CURLINFO_TEXT case

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to