httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Noordhuis <>
Subject Re: Filter to modify request headers
Date Tue, 25 Jan 2011 23:11:25 GMT
On Tue, Jan 25, 2011 at 23:22, Jodi Bosa <> wrote:
> What would be a good early hook to modify request headers that is _AFTER_
> mod_ssl is finished decrypting request?
> When I do a ap_add_input_filter() from a ap_hook_insert_filter() seems to
> trigger really late (e.g. after quick_handler, post_read, etc...).

post_read is a good place to tamper with headers, it's what mod_headers uses.

Unconditional filters should be registered with
ap_register_input_filter(), conditional filters with
ap_hook_insert_filter() and ap_hook_insert_error_filter()* +

mod_ssl's input filter runs at AP_FTYPE_CONNECTION + 5 by the way, so
you're good to go if you hook at AP_FTYPE_CONNECTION + 4. But you
probably don't need to do that.

* Something of a misnomer - error_filter also runs for 204 and 3xx responses.

View raw message