On 9 Apr 2008, at 17:33, Joe Orton wrote:
On Wed, Apr 09, 2008 at 05:07:33PM +0200, Graham Leggett wrote:
Joe Orton wrote:
I don't understand why *that* stuff needed to be in the core. It is
certainly possible to consume then reinject the request body,
without
changing one line of core filters; it's done in mod_ssl, see
ssl_io_filter_buffer/ssl_io_buffer_fill.
What about modules that call ap_discard_request_body? Once the
body has
been discarded, the body is discarded, there is no way to get it
back.
The entire request body passes through the input filter stack when
it is
being discarded. So an input filter inserted by a module can capture
and buffer it somewhere very easily; and can provide access to that
buffered copy however it likes, without needing to modify request_rec.
c.f. my mod_form (at apache.webthing.com), which does just that,
providing optional functions for other modules to access the
form data.
mod_form isn't (as it stands) clean enough to propose for
inclusion in httpd. But I think it would be a pretty trivial job
either to fix or duplicate it. And I'm happy for a module derived
from it to be ASL-licensed if it's being dropped into httpd.
--
Nick Kew