From: Nick Kew Date: Thu, 22 Jul 2010 22:50:12 +0000 (+0000) Subject: Update documentation for AddOutputFilterByType move X-Git-Tag: 2.3.7~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ae121d4499d8469d9a46967e21bef9a2cb654f52;p=thirdparty%2Fapache%2Fhttpd.git Update documentation for AddOutputFilterByType move git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@966890 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/filter.xml b/docs/manual/filter.xml index 2e85f4d4ee3..6f537dbb01f 100644 --- a/docs/manual/filter.xml +++ b/docs/manual/filter.xml @@ -163,9 +163,8 @@ Relevant directives are FilterProvider.

One further directive AddOutputFilterByType is still supported, -but may be problematic and is now deprecated. Use dynamic -configuration instead.

+module="mod_filter">AddOutputFilterByType is still supported, +but deprecated. Use dynamic configuration instead.

diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index 56dace07d4f..cf15616c71b 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 cd8aaf15593..4879033448c 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 4d3e9d765a8..2473be0d8b5 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 a4f423ce579..ab5b4872796 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 fd4f21812d9..a433e6749c2 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.