|
dpfTVS supports the CGI/1.1 specifications. This chapter is not intended as a guide to program CGI scripts or even to understand what
CGI is exactly for, the author assumes you are already familiar with that. It is just a summary of the features the CGI part of the
dpfTVS supports and what values you can expect in the commenly availabe environment variables as well as the dpfTVS specific ones. In
case you insist running dpfTVS in threading mode you should use an external mugi-cgi solution, else you might suffer from rather heavy
speed loss under high load. The uri key-word is "cgi" (example: www.myserver.com/cgi/hallo.exe). Scripts that start with "nph-" (No
Parse Header) won't go through the cgi own header parsing stage, but will still be processed by the servers main one. So it will happen that a date header field is added if not already there. This is also done to check for a forced "connection: close", to look for a cache or cache related pragma entry in the header. If it is a "200 ok" type of answer it will also still enforce a HEAD command or change the answer
to "304" in case the appropriate header fields are there. Actually it will even change it to a 206 if possible and needed. dpfTVS supports
keep-alive for http/1.0 and persistent connections for http/1.1. In order to achieve that, the server will add all header fields
nescessary. A script has to be marked as executable. If a user other than 0 was specified in the configuration file, this user has to have the appropriate rights to see the cgi work directory and to execute the script itself. The needed re-routing of stdin and stdout is directly done with pipes. The server will only create a temp-file if the request was http/1.1 and contained a chunked body. Exported http header fields All header lines of an http request are passed on as environment variables in the form specified by the cgi/1.1 specification, excluding the requests main/first line. CGI/1.1 Environment Variables
dpfTVS specific Environment Variables
Calling parameters Following the CGI/1.1 specification, a query string that does not contain an ascii '=' will be translated into ascii and the white space seperated entries will be asigned as calling parameters. The unmodified string following the '?' will also be asigned to the query string environment variable. |