- env #!optional VARNAME DEFAULTprocedure
[This procedure is passed to the CALLBACK argument of fcgi-accept-loop.]
If called with no arguments, this procedure returns a list of (name . value) pairs giving the name and value of every variable in the environment. If called with a single argument VARNAME, it returns the value of the specified variable, or #fif that variable is not set.
VARNAME may optionally be followed by a second argument, which specifies a default value to be returned if the variable is not set. (env X) is thus equivalent to (env X #f).
Note that this procedure cannot be called after another request has been accepted, since libfcgi does not maintain environments from previous requests (you will most likely get a segfault). However, an old environment can easily be saved if necessary by storing the return value of (env).