From: "Ryan Bloom" <[EMAIL PROTECTED]>
Sent: Monday, September 03, 2001 8:03 PM


> On Monday 03 September 2001 15:42, Rasmus Lerdorf wrote:
> > There should be a way to specify ordering of the content handlers in the
> > stack.
> 
> There is.  In fact, there are TWO ways to configure this.  The first way, is
> to do it in the config file.  If you do:
> 
> AddOutputFilter INCLUDES PHP

Did you mean this?  SetOutputFilter INCLUDES;PHP

If you used the syntax;

AddOutputFilter INCLUDES shtml
AddOutputFilter PHP php

And request foo.shtml.php - it's shtml parsed, then php parsed.

If you request foo.php.shtml - it's php parsed, then shtml parsed.

> Then mod_include will always be run before mod_php.  the second way is
> for module authors to do this.  Each module has an insert_filters phase.  By
> ordering the insert_filters phase, you can order which filter is called when.
> 
> If for some reason, the PHP developers always wanted to run before mod_include,
> then they should specify that the php insert_filters phase runs before the 
> mod_include insert_filters phase.

At this point, I'm strongly in favor of all usual mappings (Add/SetOutputFilter)
occuring in the mime_types phase.  When the insert_filters hook is invoked, your 
module can look at the filter stack, and rearrange it however you like.  Of course, 
others in that hook chain could do the same, so it makes sense to only change what 
you absolutely must.

Bill

Reply via email to