Hi Liviu,

I have tried by explicitly changing the option CURLOLPT_FAILONERROR to 0 and 
tested.
Am getting the http response as 200Ok and I could able to see that call back 
function is been called and it gives the complete response body.

One more issue observed is, when CURLOLPT_FAILONERROR option is set as 0, right 
after the response is received, opensips is being crashed.

Where is the path the core dump will be generated? Because am seeing crash onli 
in logs and if I check the process it is not running. But not seeing any core 
dump.

Regards,
Agalya

From: [email protected] 
[mailto:[email protected]] On Behalf Of Liviu Chircu
Sent: Thursday, July 07, 2016 4:53 AM
To: [email protected]
Subject: Re: [OpenSIPS-Users] CURL library with respect to REST_API calls

Although the official documentation specifically states that the default 
libcurl behavior is to return the body even on an error response [1], have you 
tried to explicitly set the CURLOLPT_FAILONERROR option to 0?

[1]: https://curl.haxx.se/libcurl/c/CURLOPT_FAILONERROR.html


Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com
On 06.07.2016 22:13, Ramachandran, Agalya (Contractor) wrote:
Hi Liviu,
On the below topic, I have double checked that call back function is not at 
called in the case of failure response. This is confirmed by adding some debug 
statements in write_func(). I have not made any changes with respect to 
functionality. Only in success case I could able to see the call back called.
I could also confirm by seeing the Wireshark traces am getting response body in 
the case of failure as well. In our case since call back function is not 
called, hence no response body is returned. Can you please check in your end 
whether call back is called in the case when curl_easy_perform fails.
Regards,
Agalya
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to