<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><tt>Hi Tito,</tt></p>
    <p><tt>It seems that originally, the rest_xxx() functions could
        return either "false" or "true", depending if the used libcurl
        was patched or not. This commit [1] fixed the problem, but the
        doc examples were not updated. I'll have it fixed.</tt></p>
    <p><tt>[1]: </tt><tt><a class="moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/commit/1363a620">https://github.com/OpenSIPS/opensips/commit/1363a620</a></tt></p>
    <p><tt>Best regards,<br>
      </tt></p>
    <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 25.07.2017 21:18, Tito Cumpen wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CANZPVB7o8ju=bft5GiTtPzs1kz+7Bj8anP=ut_Ecnp4Fky=x=A@mail.gmail.com">
      <div dir="ltr">
        <p class="gmail-p1"><span class="gmail-s1"><span
              class="gmail-Apple-converted-space">Group</span></span></p>
        <p class="gmail-p1"><span class="gmail-s1"><span
              class="gmail-Apple-converted-space">I am using the latest
              opensips 2.3 and I am wondering why a 404 response doesn't
              invoke this block ?</span></span></p>
        <p class="gmail-p1"><span class="gmail-s1"><span
              class="gmail-Apple-converted-space"><br>
            </span></span></p>
        <p class="gmail-p1"><span class="gmail-s1"><span
              class="gmail-Apple-converted-space">                      
                     </span>if (!</span><span class="gmail-s2">rest</span><span
            class="gmail-s1">_get("http:</span><span class="gmail-s3">//$avp(api)/cc/authorized/$fU/$rU",
            "$json(authresponse)", "$var(ct)", "$var(rcode)")) {</span></p>
        <p class="gmail-p2"><span class="gmail-s4"> </span><span
            class="gmail-s3"><span class="gmail-Apple-converted-space"> 
                    </span>xlog("Error code $var(rcode) in HTTP
            GET!\n")</span><span class="gmail-s5">;</span><br>
        </p>
        <p class="gmail-p3"><br>
        </p>
        <p class="gmail-p3"><span class="gmail-s4"> </span><span
            class="gmail-s3">xlog("on account of admittance error we are
            sending the call to the AS server for processing")</span><span
            class="gmail-s5">;</span></p>
        <p class="gmail-p3"><span class="gmail-s4"> </span><span
            class="gmail-s3"><span class="gmail-Apple-converted-space"> 
                    </span>route(ASroute)</span><span class="gmail-s5">;</span></p>
        <p class="gmail-p2"><span class="gmail-s3"> </span><span
            class="gmail-s1">}</span></p>
        <p class="gmail-p2"><span class="gmail-s1"><br>
          </span></p>
        <p class="gmail-p2"><span class="gmail-s1"><br>
          </span></p>
        <p class="gmail-p2"><span class="gmail-s1">the far end response
            looks like this.</span></p>
        <p class="gmail-p2"><span class="gmail-s1"><br>
          </span></p>
        <p class="gmail-p2">HTTP/1.1 404 Not Found.</p>
        <p class="gmail-p2">X-Powered-By: Express.</p>
        <p class="gmail-p2">Vary: Origin, Accept-Encoding.</p>
        <p class="gmail-p2">Access-Control-Allow-Credentials: true.</p>
        <p class="gmail-p2">Content-Type: text/plain; charset=utf-8.</p>
        <p class="gmail-p2">Content-Length: 9.</p>
        <p class="gmail-p2">ETag: W/"9-nR6tc+Z4+i9RpwqTOwvwFw".</p>
        <p class="gmail-p2">Date: Tue, 25 Jul 2017 18:11:39 GMT.</p>
        <p class="gmail-p2">Connection: keep-alive.</p>
        <p class="gmail-p2">.</p>
        <p class="gmail-p2">Not Found</p>
        <p class="gmail-p2">from the example it looks like other 4XX
          responses are considered.</p>
        <p class="gmail-p2"><br>
        </p>
        <p class="gmail-p2">Thanks,<br>
          Tito</p>
        <p class="gmail-p2"><br>
        </p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>