Hi,
I am using the rest_client to retrieve some information about an
incoming call using the following:
if
(!rest_get("http://127.0.0.1:8888/dir/search?number_a=$fU&number_b=$rU",
"$var(name)", "$var(ct)", "$var(rcode)")) {
xlog("Error code $var(rcode) in HTTP GET!\n");
}
else {
xlog("Received $var(name) using REST for A number $fU and B number
$rU\n");
# magic
}
In rest_client module versions 2.2.2 (?) and before this worked like a
charm. When the web server returned a 404 or another error, the script
would log the error and go on. When rest_get() received a 200 OK, magic
would happen.
Since we upgraded to rest_client module version 2.2.3 this morning this
behavior changed. When the server returns a 404, rest_get doesn't error
out, but goes on as before, and my script now tries to do magic on a 404
message's HTML body. Which is not what I want...
Did I use the rest_get() return values incorrectly, or is it a bug?
--
Andreas Sikkema
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users