Even when the performance characteristics are not suitable
for production use,
Note: this gzip example is just for the purposes of illustration.
Please refer to
You can do the same thing using
The
filtername specifies the name of the filter being
defined. This name can then be used in
Subsequent parameters can appear in any order and define the
external command to run and certain other characteristics. The
only required parameter is cmd=
. These parameters
are:
cmd=cmdline
cmd=
keyword allows you to specify the
external command to run. If there are arguments after the
program name, the command line should be surrounded in
quotation marks (e.g., cmd="/bin/mypgm
arg1 arg2"
.) Normal shell quoting is
not necessary since the program is run directly, bypassing the shell.
Program arguments are blank-delimited. A backslash can be used to
escape blanks which should be part of a program argument. Any
backslashes which are part of the argument must be escaped with
backslash themselves. In addition to the standard CGI environment
variables, DOCUMENT_URI, DOCUMENT_PATH_INFO, and
QUERY_STRING_UNESCAPED will also be set for the program.mode=mode
mode=output
(the default) for filters which
process the response. Use mode=input
for filters
which process the request. mode=input
is available
in Apache 2.1 and later.intype=imt
intype=
is
specified, the filter will be disabled for documents of other
types.outtype=imt
PreservesContentLength
PreservesContentLength
keyword specifies
that the filter preserves the content length. This is not the
default, as most filters change the content length. In the
event that the filter doesn't modify the length, this keyword
should be specified.ftype=filtertype
disableenv=env
enableenv=env
The
LogStderr | NoLogStderr
LogStderr
keyword specifies that
messages written to standard error by the external filter
program will be saved in the Apache error log.
NoLogStderr
disables this feature.Onfail=[abort|remove]
abort
(the default value)
the request will be aborted. With remove
, the
filter is removed and the request continues without it.Messages written to the filter's standard error will be stored in the Apache error log.