<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>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?<br>
<br>
[1]: <a class="moz-txt-link-freetext" href="https://curl.haxx.se/libcurl/c/CURLOPT_FAILONERROR.html">https://curl.haxx.se/libcurl/c/CURLOPT_FAILONERROR.html</a><br>
</tt>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 06.07.2016 22:13, Ramachandran,
Agalya (Contractor) wrote:<br>
<tt><span style="color:blue">Hi Liviu,<o:p></o:p></span></tt><tt>
</tt><tt>
</tt>
<p class="MsoNormal"><tt><span style="color:blue">On the below
topic, I have double checked that call back function is not
at called in the case of failure response. <o:p></o:p></span></tt><tt><span
style="color:blue">This is confirmed by adding some debug
statements in write_func(). I have not made any changes with
respect to functionality.<o:p></o:p></span></tt><tt> </tt><tt><span
style="color:blue">Only in success case I could able to see
the call back called.
<o:p></o:p></span></tt><tt><span style="color:blue"><br>
</span></tt></p>
<p class="MsoNormal"><tt><span style="color:blue">I could also
confirm by seeing the Wireshark traces am getting response
body in the case of failure as well.
<o:p></o:p></span></tt><tt></tt><tt><span style="color:blue">
In our case since call back function is not called, hence no
response body is returned.
<o:p></o:p></span></tt><tt><span style="color:blue">Can you
please check in your end whether call back is called in the
case when curl_easy_perform fails.<o:p></o:p></span></tt><tt>
</tt>
</p>
<tt></tt>
<p class="MsoNormal"><tt><span style="color:blue">Regards,<br>
Agalya</span></tt></p>
</div>
</body>
</html>