httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <>
Subject Re: mod_headers
Date Thu, 17 May 2001 16:24:43 GMT
> Bill Stoddard wrote:
> > YES! I had this on my todo list as well and will gladly review whatever
> > come up with.
> I posted a file containing a new mod_headers.c in it (easier to review
> than a patch, the module is really small). The output filter works for
> me, but the input filter does not - the filter is added to the chain but
> it never runs, and it is not obvious as to why. Can you look at this for
> me and see if there is anything I overlooked?

Humm..... It appears there are exactly two ways to add in input filter:
Either hard code it in the core code or use a SetInputFilter config
directive.  ap_run_insert_filter() inserts the header filters (both inbound
and outbound if you have HeaderIn and HeaderOut configed) but the inbound
processing has already completed so the inbound header filter is completely
ignored.  In other words, the ap_run_insert_filter() call is only useful for
output filters.

There are several different ways to fix this.  One way would be to pass an
additional parameter on ap_run_insert_filter designating whether modules
should insert their input filters or output filters. Call
ap_run_insert_filter(INSERT_INPUT_FILTERS) right after the call to
get_mime_headers(). Call ap_run_insert_filter(INSERT_OUTPUT_FILTERS) where
it is called today out of process_request_internal(). Modules would all have
to grok this parameter.  Another way to solve the this is to create a two
new hooks to replace the insert_filter hook:  ap_run_insert_input_filter() &
ap_run_insert_output_filter().  Or perhaps ignore the problem altogether if
there are no compelling reasons to enable modules to dynamically load input

Ryan and Greg, opinions?


View raw message