httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: Thoughts on filter-chain composition
Date Tue, 12 Sep 2000 01:01:52 GMT
On Tue, Sep 12, 2000 at 12:30:25AM +0000, Tony Finch wrote:
> TOKILEY@aol.com wrote:
> >Tony Finch writes...
> >
> >Best example I can think of is a filter that actually works
> >right now and is VERY necessary for any next generation
> >HTTP Server...
> >
> >The dynamic filtering of graphics content for different User Agents.
> 
> I think your suggested way of going about this is completely wrong.
> Before you get to the content handler stage you know the User-Agent
> and the resource requested. Therefore you know the input image type
> and the output image type, so you can set up the appropriate filter
> stack. This happens *before* the handler stage, and the filters do not
> have to make any decisions.
> 
> A filter should do one thing and do it well: it should not change its
> behaviour according to the circumstances of the request; instead the
> filter stack should be set up right in the first place.

+1 for Tony.

Meta-issue: we should be ensuring that content types and things get set up
long before the handler is invoked. In too many cases (and I'm guilty of it
with mod_dav), we are setting Content-Type and friends in the handler rather
than the check-type hook (or whatever it is called).

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message