From ae121d4499d8469d9a46967e21bef9a2cb654f52 Mon Sep 17 00:00:00 2001 From: Nick Kew Date: Thu, 22 Jul 2010 22:50:12 +0000 Subject: Update documentation for AddOutputFilterByType move git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@966890 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/core.xml | 65 -------------------------------------- docs/manual/mod/mod_buffer.xml | 2 +- docs/manual/mod/mod_deflate.xml | 2 +- docs/manual/mod/mod_filter.xml | 70 +++++++++++++++++++++++++++++++++++++++-- docs/manual/mod/mod_mime.xml | 2 +- 5 files changed, 70 insertions(+), 71 deletions(-) (limited to 'docs/manual/mod') diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index 56dace07d4..cf15616c71 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -258,71 +258,6 @@ content-type is text/plain or text/html AddCharset - -AddOutputFilterByType -assigns an output filter to a particular media-type -AddOutputFilterByType filter[;filter...] -media-type [media-type] ... -server config -virtual hostdirectory -.htaccess -FileInfo -Available in Apache httpd 2.0.33 and later; deprecated in Apache httpd 2.1 and later - - -

This directive activates a particular output filter for a request depending on the - response media-type. Because of certain - problems discussed below, this directive is deprecated. The same - functionality is available using mod_filter.

- -

The following example uses the DEFLATE filter, which - is provided by mod_deflate. It will compress all - output (either static or dynamic) which is labeled as - text/html or text/plain before it is sent - to the client.

- - - AddOutputFilterByType DEFLATE text/html text/plain - - -

If you want the content to be processed by more than one filter, their - names have to be separated by semicolons. It's also possible to use one - AddOutputFilterByType directive for each of - these filters.

- -

The configuration below causes all script output labeled as - text/html to be processed at first by the - INCLUDES filter and then by the DEFLATE - filter.

- - - <Location /cgi-bin/>
- - Options Includes
- AddOutputFilterByType INCLUDES;DEFLATE text/html
-
- </Location> -
- - Note -

Enabling filters with AddOutputFilterByType - may fail partially or completely in some cases. For example, no - filters are applied if the media-type could not - be determined. If you want to make sure that the filters will be - applied, assign the content type to a resource explicitly; for - example, with AddType or - ForceType. Setting the - content type within a (non-nph) CGI script is also safe.

- -
-
- -AddOutputFilter -SetOutputFilter -filters -
- AllowEncodedSlashes Determines whether encoded path separators in URLs are allowed to diff --git a/docs/manual/mod/mod_buffer.xml b/docs/manual/mod/mod_buffer.xml index cd8aaf1559..4879033448 100644 --- a/docs/manual/mod/mod_buffer.xml +++ b/docs/manual/mod/mod_buffer.xml @@ -52,7 +52,7 @@ SetInputFilter, SetOutputFilter, AddOutputFilter or - AddOutputFilterByType directives.

+ AddOutputFilterByType directives.

Using buffer with mod_include AddOutputFilterByType INCLUDES;BUFFER text/html
diff --git a/docs/manual/mod/mod_deflate.xml b/docs/manual/mod/mod_deflate.xml index 4d3e9d765a..2473be0d8b 100644 --- a/docs/manual/mod/mod_deflate.xml +++ b/docs/manual/mod/mod_deflate.xml @@ -95,7 +95,7 @@ client
will be ignored.

If you want to restrict the compression to particular MIME types - in general, you may use the AddOutputFilterByType directive. Here is an example of enabling compression only for the html files of the Apache documentation:

diff --git a/docs/manual/mod/mod_filter.xml b/docs/manual/mod/mod_filter.xml index a4f423ce57..ab5b487279 100644 --- a/docs/manual/mod/mod_filter.xml +++ b/docs/manual/mod/mod_filter.xml @@ -54,7 +54,7 @@ great deal of flexibility in configuring the filter chain. In fact, filters can be inserted based on any Request Header, Response Header or Environment Variable. This generalises the limited flexibility offered - by AddOutputFilterByType, and fixes + by AddOutputFilterByType, and fixes it to work correctly with dynamic content, regardless of the content generator. The ability to dispatch based on Environment Variables offers the full flexibility of configuration with @@ -157,8 +157,7 @@
Examples
Server side Includes (SSI)
-
A simple case of using mod_filter in place of - AddOutputFilterByType +
A simple case of replacing AddOutputFilterByType FilterDeclare SSI
FilterProvider SSI INCLUDES "$resp{Content-Type} = /^text\/html/"
@@ -251,6 +250,71 @@ Modules using it should test it carefully.

+ +AddOutputFilterByType +assigns an output filter to a particular media-type +AddOutputFilterByType filter[;filter...] +media-type [media-type] ... +server config +virtual hostdirectory +.htaccess +FileInfo +Available in Apache httpd 2.0.33 and later; deprecated in Apache httpd 2.1 and later + + +

This directive activates a particular output filter for a request depending on the + response media-type. Because of certain + problems discussed below, this directive is deprecated. The same + functionality is available using mod_filter.

+ +

The following example uses the DEFLATE filter, which + is provided by mod_deflate. It will compress all + output (either static or dynamic) which is labeled as + text/html or text/plain before it is sent + to the client.

+ + + AddOutputFilterByType DEFLATE text/html text/plain + + +

If you want the content to be processed by more than one filter, their + names have to be separated by semicolons. It's also possible to use one + AddOutputFilterByType directive for each of + these filters.

+ +

The configuration below causes all script output labeled as + text/html to be processed at first by the + INCLUDES filter and then by the DEFLATE + filter.

+ + + <Location /cgi-bin/>
+ + Options Includes
+ AddOutputFilterByType INCLUDES;DEFLATE text/html
+
+ </Location> +
+ + Note +

Enabling filters with AddOutputFilterByType + may fail partially or completely in some cases. For example, no + filters are applied if the media-type could not + be determined. If you want to make sure that the filters will be + applied, assign the content type to a resource explicitly; for + example, with AddType or + ForceType. Setting the + content type within a (non-nph) CGI script is also safe.

+ +
+
+ +AddOutputFilter +SetOutputFilter +filters +
+ FilterDeclare Declare a smart filter diff --git a/docs/manual/mod/mod_mime.xml b/docs/manual/mod/mod_mime.xml index fd4f21812d..a433e6749c 100644 --- a/docs/manual/mod/mod_mime.xml +++ b/docs/manual/mod/mod_mime.xml @@ -485,7 +485,7 @@ later. href="../filter.html">filters which will process responses from the server before they are sent to the client. This is in addition to any filters defined elsewhere, including SetOutputFilter and SetOutputFilter and AddOutputFilterByType directive. This mapping is merged over any already in force, overriding any mappings that already exist for the same extension.

-- cgit v1.2.1