This is a collection of Scheme functions used for CGI programming purposes.
We use the so-called POST method, according to which input to a CGI program
is read from standard input.
The function extract-form-input reads the necessary
amounts of input (as determined by the environment variable CONTENT_LENGT) and
returns a Lisp association list.
The function extract-url-parameters returns and decodes the url parameters.
The url parameters are the part of an URL found after the question mark.
Using the CGI interface, these are passed via the environment variable QUERY_STRING.
Like extract-form-input, the result of this function is also a Lisp association list.
The input functions (extract-form-input and extract-url-parameters) take a parameter, which
is used for testing purposes in the situation where we are not connected to a WWW server.
The global variable cgi-testing controls whether this parameter is used.
The variable cgi-testing must be defined in the context of this library.
The function time-extend extends an association list with time and date information.
This time stamping is quite useful when we extract data from an input form.
On the output side, the function write-page writes a page to standard output.
If cgi-testing, the page is written to a local test-file.
The variable test-file must be defined in the context of this library.
The function make-url-parameters produces and encodes url paramters. This is used
if we make an URL which passes parameters to another CGI program.
The function make-url makes and returns an URL.
The CGI library depends on the accompanying URL encode and decode library.
There exists a simple tutorial CGI example in elucidative style.