Contents:
The whiffenv module
Environment instruction entries
STATUS = "whiff.status"
HEADERS = "whiff.headers"
CONTENT_TYPE = "whiff.content_type"
DO_FILTER = "whiff.filter"
PARSE_CGI = "whiff.parse_cgi"
PARSE_CGI_GET = "whiff.parse_cgi_get"
PARSE_CGI_POST = "whiff.parse_cgi_post"
CGI_PREFIX = "whiff.cgi_prefix"
STRIP = "whiff.strip"
NAME = "whiff.name"
Environment information entries
ROOT = "whiff.root"
RESOURCES = "whiff.resources"
TEMPLATE_PATH = "whiff.template_path"
TEMPLATE_URL = "whiff.template_url"
TIME_STAMP = "whiff.time_stamp"
ERROR_WRAPPER = 'whiff.error_wrapper'
ENTRY_POINT = "whiff.entry_point"
RESPONDING_PATH = "whiff.responding_path"
PATH_REMAINDER = "whiff.path_remainder"
CGI_DICTIONARY = "whiff.cgi"
TOP_CGI_DICTIONARY = "whiff.top_cgi"
SOURCE_PATH = "whiff.source_path"
FULL_CGI_PREFIX = "whiff.full_cgi_prefix"
WHIFF writes and reads special entries in the
WSGI execution environment dictionary. The entries
read by WHIFF are
environment instructions which
tell WHIFF what to do. Entries written by WHIFF
are
environment information provided by WHIFF for use
by the application.
The whiffenv module
The
whiff.whiffenv module lists the string names and Python
symbolic names for all special environment entries used by the primary
whiff infrastructure (but individual middlewares and resources not part
of the primary infrastructure use other entries not described here also).
In the description below we list entries from this module using the notation
PYTHON_SYMBOLIC_NAME = "whiff.string_name"
To show both the symbolic name (for use within python programs) and the
string name (for use within configuration templates).
Environment instruction entries
The following entries may be set by an application or configuration to instruct
the WHIFF infrastructure to change its behavior.
STATUS = "whiff.status"
This string overrides the default HTTP status of "200 OK", if set.
HEADERS = "whiff.headers"
This list of pairs of strings specifies additional HTTP headers to add to the
HTTP response headers.
CONTENT_TYPE = "whiff.content_type"
This string lists the content type to report in the HTTP response headers.
If this is not specified WHIFF will use the default "text/html".
DO_FILTER = "whiff.filter"
This boolean flag if set to false will suppress the use of an automatic filter middleware.
PARSE_CGI = "whiff.parse_cgi"
This boolean flag if set to true will cause the WHIFF interpreter to parse
both CGI GET and CGI POST parameters from the incoming request for the
configuration template.
PARSE_CGI_GET = "whiff.parse_cgi_get"
This boolean flag if set to true will cause the WHIFF interpreter to parse
both CGI GET parameters from the incoming request for the
configuration template.
PARSE_CGI_POST = "whiff.parse_cgi_post"
This boolean flag if set to true will cause the WHIFF interpreter to parse
both CGI POST parameters from the incoming request for the
configuration template.
CGI_PREFIX = "whiff.cgi_prefix"
This string, if set, specifies a prefix to use to differentiate the
CGI parameters intended for this page fragment from those intended for other page
fragments.
STRIP = "whiff.strip"
This boolean flag, if set, will cause WHIFF to strip leading and trailing whitespace
from configuration template output. This is very important when the output may be
a binary file such as a JPEG image or PDF document.
NAME = "whiff.name"
This string, if set, specifies a variable name to use as a default by middlewares
that require a variable name such as
ifdef.
Environment information entries
The following environment entries will be set by WHIFF to provide the client
WSGI application with useful objects and other information.
ROOT = "whiff.root"
This provides the WHIFF root resolver object used for determining the mapping
between URLs and applications.
RESOURCES = "whiff.resources"
This provides the WHIFF resource monitor object used for translating resource paths
to resource objects.
TEMPLATE_PATH = "whiff.template_path"
This list of strings gives the path used to locate the most recent configuration template.
TEMPLATE_URL = "whiff.template_url"
This URL gives the URL used to locate the most recent configuration template.
TIME_STAMP = "whiff.time_stamp"
This number provides the system time in fractional seconds for the server. This is useful
for debugging, among other uses.
ERROR_WRAPPER = 'whiff.error_wrapper'
This flag, if set, indicates that an error wrapper middleware will handle any
uncaught exceptions from the application.
ENTRY_POINT = "whiff.entry_point"
This string provides the server relative URL associated with the initial HTTP request.
This is useful, for example, for "forms" that need to "loop back to the same page".
RESPONDING_PATH = "whiff.responding_path"
This list of strings provides the sequence of path names used to locate the present application.
PATH_REMAINDER = "whiff.path_remainder"
This list of strings provids any additional unresolved path names not used in the
process of locating the present application.
CGI_DICTIONARY = "whiff.cgi"
This dictionary of strings to lists of strings provides the localized cgi parameters
for the application (only after the parameters have been parsed).
TOP_CGI_DICTIONARY = "whiff.top_cgi"
This dictionary of strings to lists of strings provides the global cgi parameters
for the web request (only after the parameters have been parsed).
SOURCE_PATH = "whiff.source_path"
This string lists a file path associated with the most recent configuration
template.
FULL_CGI_PREFIX = "whiff.full_cgi_prefix"
This string lists the catenation of the prefixes for all parents of the present application
and the cgi prefix for the current application.