Mailing List Archive

phases...
just a little internals question...

do all mod_perl hooks correspond to apache hooks? Do they have to?

I've always wondered if it would be possible to add an extra pseudo-phase
after content generation - kinda so I could set up different <Location>s to
do whatever, then run EVERY request through a process that added
stylesheets/formatting (and skipped various MIME types, or whatever...)

Maybe the 2.0 filter mechanism will make this easier than now, though

anyway, just curious about what really goes on behind the scenes...

--Geoff
Re: phases... [ In reply to ]
>
> do all mod_perl hooks correspond to apache hooks?

more or less..., CleanupHandler isn't quite an Apache Hook, but get's called
when Apache cleans up his request data.

>Do they have to?
>

mod_perl doesn't get control outside of a Apache hooks (and resource
cleanup). The only addtional possibility where mod_perl could step in, would
be to use Ralf Engelschalls EAPI. This provides some additional hooks, where
Apache modules can register handler for it, but it's not part of the
standard Apache distribution.

> I've always wondered if it would be possible to add an extra pseudo-phase
> after content generation - kinda so I could set up different <Location>s
to
> do whatever, then run EVERY request through a process that added
> stylesheets/formatting (and skipped various MIME types, or whatever...)
>

Looks like you may use Stacked Handlers. (like Apache::Filter) You could
push such a Stacked Handler in an earlier phase (e.g. FixUpHandler) on the
stack, so you don't have to configure it for every Location.

> Maybe the 2.0 filter mechanism will make this easier than now, though
>

Yes, of course

Gerald


-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
RE: phases... [ In reply to ]
> -----Original Message-----
> From: Gerald Richter [mailto:richter@ecos.de]
> Sent: Tuesday, January 09, 2001 2:45 PM
> To: Geoffrey Young; dev@perl.apache.org
> Subject: Re: phases...
>
>
> >
> > do all mod_perl hooks correspond to apache hooks?
>
> more or less..., CleanupHandler isn't quite an Apache Hook,
> but get's called
> when Apache cleans up his request data.
>
> >Do they have to?
> >
>
> mod_perl doesn't get control outside of a Apache hooks (and resource
> cleanup). The only addtional possibility where mod_perl could
> step in, would
> be to use Ralf Engelschalls EAPI. This provides some
> additional hooks, where
> Apache modules can register handler for it, but it's not part of the
> standard Apache distribution.
>
> > I've always wondered if it would be possible to add an
> extra pseudo-phase
> > after content generation - kinda so I could set up
> different <Location>s
> to
> > do whatever, then run EVERY request through a process that added
> > stylesheets/formatting (and skipped various MIME types, or
> whatever...)
> >
>
> Looks like you may use Stacked Handlers. (like
> Apache::Filter) You could
> push such a Stacked Handler in an earlier phase (e.g.
> FixUpHandler) on the
> stack, so you don't have to configure it for every Location.

Hi Gerald...

thanks for your response - it summed things up quite nicely...

--Geoff


>
> > Maybe the 2.0 filter mechanism will make this easier than
> now, though
> >
>
> Yes, of course
>
> Gerald
>
>
> -------------------------------------------------------------
> Gerald Richter ecos electronic communication services gmbh
> Internetconnect * Webserver/-design/-datenbanken * Consulting
>
> Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
> E-Mail: richter@ecos.de Voice: +49 6133 925151
> WWW: http://www.ecos.de Fax: +49 6133 925152
> -------------------------------------------------------------
>
>