perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Ambrosino <jbambros...@gmail.com>
Subject Re: setting http output filter priority?
Date Sat, 02 Apr 2005 03:12:08 GMT
>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@modperlcookbook.org> 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
>

Mime
View raw message