httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <>
Subject Re: PHP POST handling
Date Tue, 01 Oct 2002 18:51:12 GMT
--On Tuesday, October 1, 2002 11:12 AM -0700 Greg Stein <> 

> I simply don't think that a filter should read/consume a request body. The
> handler is responsible for handling the request, which includes processing
> the body.

Wellllll, PHP doesn't exactly do that.

PHP's current strategy is to create an input filter that setsaside all 
input.  This is triggered by the ap_discard_request_body() call in 
default_handler (as discard causes all data to be read).  So, when data is 
actually pushed down into the output filter chain, PHP has a copy of the 
body in its private structure.  And, if its script requires the body, it 
returns the ctx->post_data value in its callbacks.

I think the biggest concern is when multiple modules want the input body. 
Right now, it's fairly vague what will happen (and I'm not even sure what 
the right answer is here).  Forcing input filters and doing setasides (flat 
void* instead of bb's in PHP) seems a bit clunky.  However, we also don't 
want to store the request body in memory.  -- justin

View raw message