httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: cvs commit: httpd-2.0/modules/metadata mod_headers.c
Date Sun, 20 May 2001 11:37:34 GMT
Graham Leggett wrote:
> 
> Greg Stein wrote:
> 
> > >   +    ap_hook_insert_filter(ap_headers_insert_output_filter, NULL, NULL, APR_HOOK_LAST);
> > >   +    ap_hook_fixups(ap_headers_fixup, NULL, NULL, APR_HOOK_LAST);
> > >   +    ap_register_output_filter("FIXUP_HEADERS_OUT", ap_headers_output_filter,
AP_FTYPE_CONTENT);
> > >   +}
> >
> > Is there a particular reason that the insert_filter call and the fixups need
> > to be APR_HOOK_LAST? If not, then it would be "better" to use
> > APR_HOOK_MIDDLE.
> 
> Fiddling with headers ideally should be done at the last point before
> the request headers hit the content generator, and the last minute
> before the response headers hit the browser.
> 
> This is so that "Header(In|Out) unset Header" has the chance to modify a
> particular header without a filter bypassing it. For example - someone
> might want to override the Cache-Control: header, but this would be
> impossible if the cache filter ran after the headers filter.
> 
> (In fact one could argue that this should really be
> APR_HOOK_REALLY_LAST, because a cache filter is likely to be
> APR_HOOK_LAST).

I think this should then be APR_HOOK_LAST+1, or, more likely, cache
filters should name the header filter as a successor.

APR_HOOK_REALLY_LAST is really intended for internal use only...

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Mime
View raw message