[OpenSIPS-Users] CURL library with respect to REST_API calls
Ramachandran, Agalya (Contractor)
Agalya_Ramachandran at comcast.com
Thu Jul 7 19:53:34 CEST 2016
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: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Liviu Chircu
Sent: Thursday, July 07, 2016 4:53 AM
To: users at lists.opensips.org
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160707/cf45392c/attachment-0001.htm>
More information about the Users
mailing list