httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject RE: mod_tls
Date Wed, 29 Aug 2001 18:25:47 GMT
On Wed, 29 Aug 2001, Gonyou, Austin wrote:

> The referrence here is one about all the filters used by apache 2.0.
> If there is a filter bucket in APR,

What do you mean by "filter bucket"?

> it's understandable that Apache 2.0 modules will have 2 parts. The
> logic piece and the filter piece.

Not necessarily.  Many filter modules will basically ONLY be a
filter--whatever logic there is goes inside the filter itself.  The core
has several filters that are examples of this.

> As far as I can tell, the filter mechanism allows for some distinct
> advantages and makes for a very flexible configuration framework. My
> issue here is that if mod_tls is sacrificed, then what's the point of
> using filters at all anyway?

Perhaps you're missing the fact that mod_ssl *is* using filters on its
own... it simply has a duplicate copy of the filter logic from mod_tls.
The original idea was that mod_tls would be the filter and mod_ssl would
add the "extra features", but in fact they're not really "extra" at all,
and really are necessary support functionality.  So it makes sense to have
it all in one module.  But even if mod_tls gets taken out, no
functionality is changed; we just remove the duplicate (now outdated) copy
of the filter logic that remains in mod_tls in favor of the improved copy
of that same logic that is now in mod_ssl.

> That said, could it be said that you CAN write a module for Apache 2.0
> without needing the use of filters?

Sure, that's no different from 1.3.  You can write a handler or an auth
module or any number of things that make no use of filters whatsoever.
BUT (to answer Sunitha's question), filters make some coding tasks a
helluva lot easier.  SSL is one of them.  Why?  Because in some cases
(mod_ssl, mod_include, just to name a few), all you want to do is morph
the content as it passes through you in some way (encrypt/decrypt, parse
for SSI tags, etc).  You are neither the generator of the content nor the
ultimate consumer of the content, just a filter that sits in between.
And multiple filters can be stacked on top of each other, which adds all
sorts of flexibility.  So COULD you write mod_ssl for Apache 2.0 as
something other than a filter?  Probably, but it'd involve lots of extra
work and clever hacks much like what it took to get an SSL-aware 1.3.
Filters take care of much of that work for you behind the scenes.

--Cliff


Mime
View raw message