The following environment variables are currently available in NeoWebScript:
webenv
contains information from the
webserver as key-value pairs. (In a normal CGI application, this data
would be passed in through Unix environment variables.)
The following array variables are normally present:
the time the file was last modified in integer-seconds-since-1970 format
the default time format passed to strftime in C, or clock in NeoWebScript
\n"
}
html " \n"
The following configurations are supported:
which creates trusted interpreter (the default is to create a safe
interpreter)
If value is "Yes", then a Postgres-enabled NeoWebScript
server will know to connect to a database owned by the user.
If value is "Any" the server can connect to any database owned by
any user.
See httpd/conf/postgres.tcl for details.
\n"
set envlist [lsort [array names webenv *]]
loop x 0 [llength $envlist] {
set y $webenv([lindex $envlist $x])
if {[clength [lindex $y end]] > 50} {
set count 50
set char z
while {![cequal $char /]} {
incr count -1
set char [cindex $y $count]
}
set temp "[crange $y 0 [expr $count - 1]] [crange $y $count end]"
set y $temp
}
html "
$yload_response
and
load_cookies
are available to parse out the variables
passed from a form, in the former case, and from the persistent
data "cookie" mechanism, in the latter. These variables are put
into an array, like the webenv array. The default array names are
response for form information (http GET and POST operations), and cookies
for cookie information, but these can be changed by arguments to
the commands.
NeoWebServerConf array
This is an array that may be initialized from the httpd/httpd.conf
file. Lines from that file may not be enclosed within any other specification
(ie. <Directory>
). Format is
which results in the equivalent of the Tcl code
in the trusted interpreter. Further interpretation is
up to the Tcl code. If
value
contains spaces,
it must be quoted with double quotes.
NeoWebDirConf array
Per-directory initialization of the trusted interpreter
from the httpd/access.conf file sets this variable.
Usage within httpd/access.conf is:
which
results in the equivalent of the Tcl code
in the trusted interpreter. Further interpretation is
up to the Tcl code. If set NeoWebDirConf($key) $value
value
contains spaces,
it must be quoted with double quotes.
NeoWebDirConf Supervisor 1
NeoWebDirConf Postgres value