httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Filter interface (was Re: Urgent 2.0 issues)
Date Sun, 17 Dec 2000 21:31:21 GMT

[cross-posted from a discussion on apache-docs]

On Sun, 17 Dec 2000 wrote:
> > 2. Filters: I think we need some advice from Ryan here.  I don't
> > understand what the user interface to filters is supposed to be.  How are
> > documents supposed to be designated for SSI processing, for example?
> Currently, there are two ways to designate a page for filters.  The first
> is AddFilter.  This is a simple directive that just takes a list of
> filters.  SSI's would be enabled for filters by adding the following:
> <Files ~ \.shtml$>
>     AddFilter INCLUDES
> </Files>
> The second is SetFilter.  This takes a mime-type and a list of
> filters.  So it would look like:
> SetFilter test/html INCLUDES

I believe this is inconsistent with existing Apache behaviour and should
be fixed (preferably before the beta).  In particular, I suggest that the
Filter directives be made analagous to the Handler directives.  Currently,
they conflict horribly and we will be confusing people.

My proposal is:

Similar to AddHandler:
Syntax: AddFilter filter-name [filter-name] ... extension [extension] ...

Similar to SetHandler:
Syntax: SetFilter filter-name [filter-name] ...

FilterByType (or some other similar name)
Similar to your current SetFilter:
Syntax: Setfilter filter-name [filter-name] ... MIME-type

Admittedly, this is not perfect, because Apache will need to
check each argument to see whether it is a (for example) extension or
filter-name.  Users could assure that a certain argument was processed as
an extension by using the leading dot.  The same problem doesn't exist for
MIME-types as long as filter-names cannot contain "/".

And yes, I agree that if we were starting today from scratch, the
AddFilter/AddHandler would not even be necessary because of the use of
<Files> blocks.  In addition "SetFilter" will be a misnomer, because it
will actually be "Adding" filters to the stack.  However, I think this is
better than corrupting the current usage of these terms.

If you do not agree with this, then PLEASE, at least change the current
AddFilter to be SetFilter and rename the current SetFilter to something


View raw message