httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <>
Subject [Patch] Async write completion for the full connection filter stack
Date Mon, 08 Sep 2014 01:31:54 GMT
Hi all,

I have attached a patch that attempts to support async write completion for the full connection
filter stack, not just the core output filter. In turn, this should bring async write completion
to mod_ssl, and can be backported to v2.4.

The idea behind the patch is to change the brigade used during write completion from a NULL
brigade passed to the core output filter to an empty brigade, and pass this empty brigade
to all connection filters. The obvious problem is existing filters that don’t pass empty
brigades down the stack - the patch compensates for this by detecting these not-pass-brigade
cases and then by passing the empty brigade to the next filter in the chain manually, ensuring
that every filter gets a turn to attempt to flush any buffers.

The test suite passes with this patch, I need some more eyeballs to verify I didn’t miss

The next obvious problem to solve is to look at how to run request filters through write completion.
There are a number of ways to approach this. One is to replace c->output_filters with r->output_filters
and reinstate c->output_filters on cleanup of r->pool, or have a formal c->request_output_filters
that would override c->output_filters if present (there would need to be some magic to
ensure that it is possible to remove the first filter in the chain, separate problem). The
problem of the output filter stack trying to process the entire response in one go could potentially
be solved by a request filter that attempts to pass “bite sized chunks” down the filter
stack while setting aside the rest, mirroring what the core output filter does now, but for
the whole stack. Ideas to explore.


View raw message