httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: dev question: apreq 2 as a filter?
Date Sun, 25 Aug 2002 04:11:00 GMT
Joe Schaefer wrote:
> "Issac Goldstand" <> writes:
> [...]
>>Joe Schaefer wrote:
>>>I don't agree.  IMO (using your terminology) the warehouse should
>>>be off-limits until the POST data has been parsed *completely*.  That
>>>means *only* the content handler should be making any enquiries.
>>>Furthermore, if the content handler wants to call ap_get_brigade
>>>itself to get at a portion of the POST stream, it should do that
>>>*before* ever visiting our warehouse.  Otherwise apreq_request_parse
>>>should just gobble it all up.
>>I don't get it...  Correct me if I'm wrong, but I see two possible scenarios
>>for apreq2 implementation:
>>1)  Installed as filter - In this case, any call to ap_get_brigade will
>>cause data to pass through apreq (which will duly save of copy of the data
>>it recieves in its "warehouse").  Alternatively, any implicit or explicit
>>call to $q->parse will trigger apreq to call ap_get_brigade internally to
>>grab the data.
> That is *exactly* what I'm saying; I think part of the confusion we're 
> having centers around *when* the apreq filter gets installed.  The 
> content-handler needs the ability to inject our apreq filter at runtime.  
> IMO, the injection should take place in the apreq_request_new 
> call, and the content-handler wants to call ap_get_brigade, it should
> do it between apreq_request_new() and apreq_request_parse().  
> I think Stas is arguing that the apreq filter could be injected
> later on, perhaps inside the apreq_request_parse call, but I think 
> that makes things too complicated.

Ah, no, I'm not arguing about that... or anything at all :)

Bill was saying that he won't grab more than 64k of the body by default. 
I suggested that this should be configurable by apreq.

I think that we are all saying a similar thing, the only confusion is 
about what happens if apreq injects its filter, but somebody else calls 
ap_get_brigade. This probably should never happen if apreq first 
consumes(/copies) all the body, assuming that it's configured that way 
and the body is not too big.

And I agree with Issac's two descriptions, where 2) simply consumes all 
the body without using filters, which can be done from 1) where the 
filter simply consumes the data and doesn't pass anything but EOS further.

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

View raw message