cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Libcurl debug info

From: neocarlitos <neocarlitos_at_yahoo.com.mx>
Date: Wed, 01 Sep 2010 00:27:15 +0100

>> I'm migrating the examples from the C API to java. I ran into a
>> problem while migrating sepheaders.c. Basically, I can manage to write
>> data to body.out, OR to head.out but when I try them together, program
>> crashes. Is there a way to print debugging information before
>> curl_easy_perform is called, so I can see what I'm doing wrong?
>
> The code running before curl_easy_perform() is called, is your code
> isn't it? Or at least the java binding code? Then just sprinkle it with
> printfs or whatever. Or use a debugger. I think I must've misunderstood
> the question...
>

Sorry, I think I wasn't very clear on my previous post. Basically what
I'm doing is writing java code which calls the C functions
(curl_easy_setopt(), curl_easy_perform(), etc) via JNI. After creating
the curl handle using curl_easy_init() and setting up several options
via curl_easy_setopt(), we are ready to go but... the program is
crashing when the C function curl_easy_perform.

I've got (lots) of printfs all over the place (both in Java and C code).
  It seems as if I'm setting some option which perform() doesn't like
and causes the crash. I would like to know if there is a way to print
the 'options currently set' in a handle:

curl_easy_printDebug(curl_handle);

handle.url -> "http://curl.haxx.se"

However, am I right to think that setting option CURLOPT_VERBOSE should
do something very similar?

Many thanks,
neocarlitos
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-01