slive 00/11/28 20:29:12
Modified: htdocs/manual/mod mod_ext_filter.html Log: Bring mod_ext_filter.html up to the new format. Revision Changes Path 1.2 +81 -76 httpd-docs-2.0/htdocs/manual/mod/mod_ext_filter.html Index: mod_ext_filter.html =================================================================== RCS file: /home/cvs/httpd-docs-2.0/htdocs/manual/mod/mod_ext_filter.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -b -u -r1.1 -r1.2 --- mod_ext_filter.html 2000/10/28 15:17:40 1.1 +++ mod_ext_filter.html 2000/11/29 04:29:11 1.2 @@ -14,13 +14,25 @@ <!--#include virtual="header.html" --> <H1 ALIGN="CENTER">Module mod_ext_filter</H1> - <P> - This module is contained in the <CODE>mod_ext_filter.c</CODE> file, with - Apache 2.0 and later. It provides the ability to pass the response body - through an external program before delivering to the client. - <CODE>mod_ext_filter</CODE> is not compiled into the server by default. - </P> + <P>This module provides the ability to pass the response body + through an external program before delivering to the client.</p> + +<p><A +HREF="module-dict.html#Status" +REL="Help" +><STRONG>Status:</STRONG></A> Experimental +<BR> +<A +HREF="module-dict.html#SourceFile" +REL="Help" +><STRONG>Source File:</STRONG></A> mod_ext_filter.c +<BR> +<A +HREF="module-dict.html#ModuleIdentifier" +REL="Help" +><STRONG>Module Identifier:</STRONG></A> ext_filter_module</p> + <H2>Summary</H2> <P> This is an <STRONG>experimental</STRONG> module and should be used with @@ -59,6 +71,67 @@ </LI> </UL> + + <H2>Examples</H2> + + <H3>Generating HTML from some other type of response</H3> + + <PRE> + # mod_ext_filter directive to define a filter to HTML-ize text/c files + # using the external program /usr/bin/enscript, with the type of the + # result set to text/html + ExtFilterDefine c-to-html mode=output intype=text/c outtype=text/html \ + cmd="/usr/bin/enscript --color -W html -Ec -o - -" + + <Directory "/export/home/trawick/apacheinst/htdocs/c"> + + # core directive to cause the new filter to be run on output + AddOutputFilter c-to-heml + + # mod_mime directive to set the type of .c files to text/c + AddType text/c .c + + # mod_ext_filter directive to set the debug level just high + # enough to see a log message per request showing the configuration + # in force + ExtFilterOptions DebugLevel=1 + + </Directory> + </PRE> + + <H3>Implementing a content encoding filter</H3> + + <PRE> + # mod_ext_filter directive to define the external filter + ExtFilterDefine gzip mode=output cmd=/bin/gzip + + <Location /gzipped> + + # core directive to cause the gzip filter to be run on output + AddOutputFilter gzip + + # mod_header directive to add "Content-Encoding: gzip" header field + Header set Content-Encoding gzip + + </Location> + </PRE> + + <H3>Slowing down the server</H3> + <PRE> + # mod_ext_filter directive to define a filter which runs everything + # through cat; cat doesn't modify anything; it just introduces extra + # pathlength and consumes more resources + ExtFilterDefine slowdown mode=output cmd=/bin/cat preservescontentlength + + <Location /> + + # core directive to cause the slowdown filter to be run several times on + # output + AddOutputFilter slowdown slowdown slowdown + + </Location> + </PRE> + <HR> <H2><A NAME="extfilterdefine">ExtFilterDefine</A></H2> @@ -92,11 +165,6 @@ HREF="directive-dict.html#Module" REL="Help" ><STRONG>Module:</STRONG></A> mod_ext_filter - <BR> - <A - HREF="directive-dict.html#Compatibility" - REL="Help" - ><STRONG>Compatibility:</STRONG></A> Only available in Apache 2.0 or later <P> The <CODE>ExtFilterDefine</CODE> directive defines the characteristics of @@ -148,6 +216,8 @@ length, this keyword should be specified. </DL> +<hr> + <H2><A NAME="extfilteroptions">ExtFilterOptions</A></H2> <P> <A @@ -179,11 +249,6 @@ HREF="directive-dict.html#Module" REL="Help" ><STRONG>Module:</STRONG></A> mod_ext_filter - <BR> - <A - HREF="directive-dict.html#Compatibility" - REL="Help" - ><STRONG>Compatibility:</STRONG></A> Only available in Apache 2.0 or later <P> The <CODE>ExtFilterOptions</CODE> directive specifies special processing @@ -220,66 +285,6 @@ <CODE>mod_ext_filter</CODE>. <P> - - <H2>Examples</H2> - - <H3>Generating HTML from some other type of response</H3> - - <PRE> - # mod_ext_filter directive to define a filter to HTML-ize text/c files - # using the external program /usr/bin/enscript, with the type of the - # result set to text/html - ExtFilterDefine c-to-html mode=output intype=text/c outtype=text/html \ - cmd="/usr/bin/enscript --color -W html -Ec -o - -" - - <Directory "/export/home/trawick/apacheinst/htdocs/c"> - - # core directive to cause the new filter to be run on output - AddOutputFilter c-to-heml - - # mod_mime directive to set the type of .c files to text/c - AddType text/c .c - - # mod_ext_filter directive to set the debug level just high - # enough to see a log message per request showing the configuration - # in force - ExtFilterOptions DebugLevel=1 - - </Directory> - </PRE> - - <H3>Implementing a content encoding filter</H3> - - <PRE> - # mod_ext_filter directive to define the external filter - ExtFilterDefine gzip mode=output cmd=/bin/gzip - - <Location /gzipped> - - # core directive to cause the gzip filter to be run on output - AddOutputFilter gzip - - # mod_header directive to add "Content-Encoding: gzip" header field - Header set Content-Encoding gzip - - </Location> - </PRE> - - <H3>Slowing down the server</H3> - <PRE> - # mod_ext_filter directive to define a filter which runs everything - # through cat; cat doesn't modify anything; it just introduces extra - # pathlength and consumes more resources - ExtFilterDefine slowdown mode=output cmd=/bin/cat preservescontentlength - - <Location /> - - # core directive to cause the slowdown filter to be run several times on - # output - AddOutputFilter slowdown slowdown slowdown - - </Location> - </PRE> <!--#include virtual="footer.html" --> </BODY>