cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_VERBOSE: a small proposal

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 12 Sep 2003 20:39:23 +0200 (CEST)

On Fri, 12 Sep 2003, Mohun Biswas wrote:

> Thanks, I hadn't previously understood DEBUGFUNCTION but now I do and have
> implemented it as you say. A few notes from the experience: I see little
> explicit documentation on how to use DEBUGFUNCTION and no code examples. The
> curl_easy_setopt page which mentions DEBUGFUNCTION makes reference to
> curl_infotype but curl_infotype is not documented (?). I had to look into
> the hearders to see what it is.

Oh, that's not very nice. I added them to the man page just now. Thanks for
pointing this out.

> Also, curl_easy_setopt page says "This function will receive debug
> information if CURLOPT_VERBOSE is enabled." but should probably say
> something more like "CURLOPT_DEBUGFUNCTION replaces the standard debug
> function used when CURLOPT_VERBOSE is in effect with the specified
> function". Because it wasn't clear to me that this was instead of regular
> verbosity or in addition to it.

Aha, ok! I used your phrasing above as input and updated the man page.

> Last, is there a documented way to pass control along to the standard debug
> function? I.e. in my case I only wanted to change the handling of one of the
> infotypes (CURLINFO_HEADER_OUT) and would have liked to pass all others off
> to Curl_debug() instead of doing what I did which was to replicate all the
> logic of Curl_debug() and modify it for the one case.

No, there's no such option. The amount of duplicated code is rather slim
anyway, as Curl_debug() is very small.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-09-12