Version 0.1
A very serious, industrial web framework in Tcl
 All Data Structures Namespaces Files Functions Variables Pages
Public Member Functions | Static Public Attributes
tanzer::cgi::handler Class Reference
Inheritance diagram for tanzer::cgi::handler:
tanzer::forwarder

Public Member Functions

 constructor opts
 
 open session
 
 cleanup session
 
 close session
 
 read session data
 
 write session
 
- Public Member Functions inherited from tanzer::forwarder
 constructor args
 
 cleanup session
 
 open session
 
 close session
 
 pipe in sock session
 

Static Public Attributes

 proto
 
 defaultStatus
 
- Static Public Attributes inherited from tanzer::forwarder
 defaultStatus
 

Detailed Description

The CGI/1.1 inbound request handler.

Constructor & Destructor Documentation

tanzer::cgi::handler::constructor   opts  

Create a new CGI/1.1 inbound request handler.

The following values must be specified as a list of key-value pairs in $opts:

  • program

    The path to a CGI/1.1 executable.

  • name

    The script name to report to the CGI/1.1 executable via the SCRIPT_NAME environment variable.

  • root

    The document to report to the CGI/1.1 executable via the DOCUMENT_ROOT environment variable.

The CGI/1.1 handler is deliberately meant to provide service for one executable, primarily due to security concerns. However, the flexibility afforded by associating an arbitrary route path with any number of these request handlers provides advantages over requiring a CGI dispatcher to locate scripts in a designated cgi-bin directory.

The CGI/1.1 handler functions simply: After being given the incoming request, it executes the CGI program with the appropriate environment variables, and parses the CGI program's response into a new tanzer::response object, which is then sent to the client. The response body is subsequently passed to the client unmodified.


The documentation for this class was generated from the following file: