Beesnest - Personal Application Server

Home Documents Downloads/Code About Contact Me

Beesnest Special Variables

Beesnest stores a lot of data in special variables. Accessing these variables is through the Request object (IdcRequest::GetRequestVariable). All of these variables starts with BN_. There are also inner variables that start with BNI_. Do not use these two prefixes to regular variable names.

GET, POST and Cookies

I store all of the incoming request variables in one collection (map). If you need to separate it to GET, POST and Cookies variables, you can access the raw data from the special variables BN_Query, BN_Body and BN_Cookies.

These variables will always be present

Variables of the Login System

The built-in login system also uses BN_ variables. Whenever a user is logged in BN_Username will hold the user name (also when using DAA login). If you did not set Auto-Cookie to yes in the configuration of the login system, you should send BN_UserID and BN_RndCode back to the server, with each request to a protected page. If you want to log out, set BN_Logout to yes.

You should use these variables just if you are going to rewrite the login page.

Regular variables

In the same collection, Beesnest stores all the regular request variables that came from the query line (GET), the request body (POST) and from Cookies.

If you want a complete list of all the variables, use the IdcRequest:GetRequestVarsNamesList function (from a script).

If your list separator starts with H you will get a list of all the request headers.

Request Variables and CGI calls

Beesnest does not support CGI calls. However, if needed, most if not all of the CGI environment variables values, can be acquired from the BN_ variables. I suppose that some of the script engines will have to use this technique, because the interpreter will be able to work just with a CGI like calls. Moreover, it is possible to write a generic CGI script engine, that will just execute arbitrary CGI program. This engine cannot be a Storable engine though.

Home Documents Downloads/Code About Contact Me