httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Noordhuis <>
Subject Re: Help trying to figure out why an output_filter is not called.
Date Wed, 05 Jan 2011 15:43:19 GMT
On Wed, Jan 5, 2011 at 15:54, Joshua Marantz <> wrote:
> Can you elaborate?   Is this a common practice, to write bytes directly to
> the network from an output filter?  What should I look for?  The owner of

Not common but sometimes you can't avoid it (search the mailing list,
there are a few examples).

> LoadModule perl_module modules/

mod_perl allows scripts to write directly to the socket.

> I guess we should eliminate FIXUP_HEADERS_OUT, FIXUP_HEADERS_ERR, and
> MOD_EXPIRES.  Are there any other similar header-mucking-filters I need to
> kill?  I don't mind squirreling through the source code to find these names
> (all are string literals in .c files) but I'm nervous they could change
> without warning in a future version.

That's very unlikely to happen with Apache core modules.

> Moreover, expires_insert_filter runs as APR_HOOK_MIDDLE which means it runs
> after my content-generator, which means that it won't have been inserted by
> the time when I want to set my caching headers.

You can remove it from your handler, scan
r->output_filters->frec->name to find the filter.

> I guess that means I have to insert a new late-running hook that kills
> undesirable output filters.  Does that wind up being simpler?

The above is probably easier but whatever ends up being the most
readable / maintainable, right?

View raw message