curl / Mailing Lists / curl-library / Single Mail

curl-library

print curl_easy_setopt in debug function

From: Tejas <tejashs_at_protonmail.com>
Date: Mon, 04 Jun 2018 15:13:47 -0400

Does anybody else think that printing out the options(curl_easy_setopt) via debug function (or -v) will be helpful?

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)
...

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