From a8451b783c48b483de10b05a82f6d043c104cfcc Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Thu, 15 Sep 2011 21:03:59 +0000 Subject: [PATCH] Un-deprecate AddOutputFilterByType and update docs. Its limitations have been fixed by the move to mod_filter. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1171273 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_filter.xml | 28 ++++++---------------------- modules/filters/mod_filter.c | 2 +- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/docs/manual/mod/mod_filter.xml b/docs/manual/mod/mod_filter.xml index 109e40b447..50d08c1e81 100644 --- a/docs/manual/mod/mod_filter.xml +++ b/docs/manual/mod/mod_filter.xml @@ -52,13 +52,9 @@

mod_filter by contrast gives server administrators a 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 - 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 - mod_rewrite to anyone who needs it.

+ filters can be inserted based on complex boolean + expressions This generalises the limited + flexibility offered by AddOutputFilterByType.

Filter Declarations, Providers and Chains @@ -259,14 +255,13 @@ virtual hostdirectory .htaccess FileInfo -Available in Apache httpd 2.0.33 and later; deprecated in Apache httpd 2.1 and later +Version 2.0.33 and later; had severe limitations before +being moved to mod_filter in version 2.3.7

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.

+ response media-type.

The following example uses the DEFLATE filter, which is provided by mod_deflate. It will compress all @@ -297,17 +292,6 @@ </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 diff --git a/modules/filters/mod_filter.c b/modules/filters/mod_filter.c index ad4eb2fde6..29275d350c 100644 --- a/modules/filters/mod_filter.c +++ b/modules/filters/mod_filter.c @@ -722,7 +722,7 @@ static const command_rec filter_cmds[] = { AP_INIT_TAKE2("FilterTrace", filter_debug, NULL, RSRC_CONF | ACCESS_CONF, "filter-name debug-level"), AP_INIT_TAKE_ARGV("AddOutputFilterByType", filter_bytype, NULL, OR_FILEINFO, - "DEPRECATED: output filter name followed by one or more content-types"), + "output filter name followed by one or more content-types"), #ifndef NO_PROTOCOL AP_INIT_TAKE23("FilterProtocol", filter_protocol, NULL, OR_OPTIONS, "filter-name [provider-name] protocol-args"), -- 2.40.0