User Tools

Site Tools


cookbooks:devel:pseudovariables

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
cookbooks:devel:pseudovariables [2021/03/25 13:03]
miconda [$T_branch_idx]
cookbooks:devel:pseudovariables [2021/04/03 08:31] (current)
miconda [$rc - Returned code]
Line 437: Line 437:
 **$retcode** - same as **$rc** **$retcode** - same as **$rc**
  
 +Note that the value of $rc is overwritten by each new function call.
 +
 +Example of use:
 +
 +<code c>
 + lookup("location");
 + $var(rc) = $rc;
 + if ($var(rc) < 0) {
 + t_newtran();
 + switch ($var(rc)) {
 + case -1:
 + case -3:
 + send_reply("404", "Not Found");
 + exit;
 + case -2:
 + send_reply("405", "Method Not Allowed");
 + exit;
 + }
 + }
 +
 +</code>
 ==== $rd - Domain in R-URI ==== ==== $rd - Domain in R-URI ====
  
cookbooks/devel/pseudovariables.txt ยท Last modified: 2021/04/03 08:31 by miconda