httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <>
Subject Re: cvs commit: httpd-2.0/modules/metadata mod_headers.c
Date Sun, 20 May 2001 00:49:14 GMT
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,
> >   +}
> 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

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

-----------------------------------------		"There's a moon
					over Bourbon Street
View raw message