From: Jeff Trawick Date: Wed, 26 Jun 2002 19:54:53 +0000 (+0000) Subject: add another example filter, try to clarify how parameters to the filter X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f9593e02f643fe407904607fcbc81075c472d56;p=apache add another example filter, try to clarify how parameters to the filter program are specified git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95892 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_ext_filter.html.en b/docs/manual/mod/mod_ext_filter.html.en index 0148f613ed..ebf0d1bb7e 100644 --- a/docs/manual/mod/mod_ext_filter.html.en +++ b/docs/manual/mod/mod_ext_filter.html.en @@ -2,9 +2,9 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX This file is generated from xml source: DO NOT EDIT XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - -->mod_ext_filter- Apache HTTP Server
[APACHE DOCUMENTATION]

Apache HTTP Server Version 2.0

Apache Module mod_ext_filter

Description:Pass the response body + -->mod_ext_filter- Apache HTTP Server
[APACHE DOCUMENTATION]

Apache HTTP Server Version 2.0

Apache Module mod_ext_filter

Description:Pass the response body through an external program before delivery to the - client
Status:Experimental
Module Identifier:ext_filter_module

Summary

+ client
Status:Experimental
Module Identifier:ext_filter_module

Summary

This is an experimental module and should be used with care. Test your mod_ext_filter configuration carefully to ensure that it performs the desired @@ -105,6 +105,24 @@

+

Using sed to replace text in the response

+
+
+  # mod_ext_filter directive to define a filter which replaces text in
+  # the response
+  ExtFilterDefine fixtext mode=output cmd="/bin/sed s/verdana/arial/g" intype=text/html
+
+  <Location />
+
+  # core directive to cause the fixtext filter to be run on output
+  # output
+  SetOutputFilter fixtext
+
+  </Location>
+
+
+ +

ExtFilterDefine Directive

Description:
Syntax:ExtFilterDefine filtername parameters
Context:server config
Status:Experimental
Module:mod_ext_filter

The ExtFilterDefine directive defines the characteristics of an external filter, including the program to @@ -128,7 +146,9 @@

The 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.
+ quotation marks (e.g., cmd="/bin/mypgm arg1 arg2". + Normal shell quoting is not necessary since the program is + run directly, bypassing the shell.
mode=mode
diff --git a/docs/manual/mod/mod_ext_filter.xml b/docs/manual/mod/mod_ext_filter.xml index 986eea8ec1..0899a29813 100644 --- a/docs/manual/mod/mod_ext_filter.xml +++ b/docs/manual/mod/mod_ext_filter.xml @@ -114,6 +114,24 @@ +
Using sed to replace text in the response + +
+  # mod_ext_filter directive to define a filter which replaces text in
+  # the response
+  ExtFilterDefine fixtext mode=output cmd="/bin/sed s/verdana/arial/g" intype=text/html
+
+  <Location />
+
+  # core directive to cause the fixtext filter to be run on output
+  # output
+  SetOutputFilter fixtext
+
+  </Location>
+
+
+
+ @@ -144,7 +162,9 @@
The 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.
+ quotation marks (e.g., cmd="/bin/mypgm arg1 arg2". + Normal shell quoting is not necessary since the program is + run directly, bypassing the shell.
mode=mode