Re: setting http output filter priority?

[prev] [thread] [next] [Date index for 2005/04/02]

From: Jeff Ambrosino
Subject: Re: setting http output filter priority?
Date: 03:12 on 02 Apr 2005
From looking at the code, it appears that I may need to modify
mod_perl and either
of mod_cache or mod_deflate:

mod_perl.c - line ~839
----------------------------------
    ap_register_output_filter(MP_FILTER_REQUEST_OUTPUT_NAME,
                              MP_FILTER_HANDLER(modperl_output_filter_handler),
                              AP_FTYPE_RESOURCE);		// <---------------

mod_cache.c - line ~936
----------------------------------
    cache_save_filter_handle =
        ap_register_output_filter("CACHE_SAVE",
                                  cache_save_filter,
                                  NULL,
                                  AP_FTYPE_CONTENT_SET-1);	// <---------------
[...]
    cache_out_filter_handle =
        ap_register_output_filter("CACHE_OUT",
                                  cache_out_filter,
                                  NULL,
                                  AP_FTYPE_CONTENT_SET-1);	// <---------------

mod_deflate.c - line ~845
----------------------------------
    ap_register_output_filter(deflateFilterName, deflate_out_filter, NULL,
                              AP_FTYPE_CONTENT_SET);		// <---------------

So, mod_perl.c could register as AP_FTYPE_CONTENT, and mod_deflate.c could
register as AP_FTYPE_CONTENT_SET+1. I think this is the least invasive
change to get
things working...  do you concur?

thanks,
Jeff


On Apr 1, 2005 7:02 PM, Geoffrey Young <geoff@xxxxxxxxxxxxxxx.xxx> wrote:
> 
> > See the problem?  MYFILTER is getting inserted before the cache is serving up
> > the content, but I really want it to go after (otherwise MYFILTER doesn't
> > see the body content).  Is there a way around this aside from
> > modifying mod_cache?
> 
> at the moment, no - the hooking mechanism in apache just isn't designed for
> this type of thing.  in apache 1.3 we could mess with the order in which
> modules ran, but not in 2.0.
> 
> an alternative to modifying mod_cache would be to modify mod_perl.  from the
> look of things, mod_cache needs to be in a specific place wrt other core
> modules, so it might be easier to just modify mod_perl.  but that would
> affect the order of all perl filters, so...
> 
> --Geoff
>

(message missing)

setting http output filter priority?
Jeff Ambrosino 01:03 on 01 Apr 2005

Re: setting http output filter priority?
Geoffrey Young 01:11 on 01 Apr 2005

Re: setting http output filter priority?
Jeff Ambrosino 23:13 on 01 Apr 2005

Re: setting http output filter priority?
Geoffrey Young 00:02 on 02 Apr 2005

Re: setting http output filter priority?
Jeff Ambrosino 03:12 on 02 Apr 2005

Re: setting http output filter priority?
Geoffrey Young 13:09 on 02 Apr 2005

Re: setting http output filter priority?
Jeff Ambrosino 19:32 on 07 Apr 2005

Re: setting http output filter priority?
Geoffrey Young 20:17 on 07 Apr 2005

Generated at 14:43 on 11 Apr 2005 by mariachi v0.52