httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Issac Goldstand" <>
Subject Re: dev question: apreq 2 as a filter?
Date Sat, 24 Aug 2002 22:12:31 GMT

----- Original Message -----
From: "Joe Schaefer" <>
To: "Stas Bekman" <>
Cc: "apreq list" <>
Sent: Saturday, August 24, 2002 10:43 AM
Subject: Re: dev question: apreq 2 as a filter?

> Stas Bekman <> writes:
> > William A. Rowe, Jr. wrote:
> > > At 02:46 AM 8/23/2002, Stas Bekman wrote:
> [...]
> > >> No, the problem I'm referring to is how to invoke the filter in first
> > >> place. It won't be invoked if the response handler won't call
> > >> ap_get_brigade. Hmm, I think I know how this should work.
> > >>
> > >> Any time anybody does any enquiry from apreq, we check a flag whether
> > >> we have the data consumed and parsed (which is done already). If it
> > >> wasn't consumed yet, apreq inserts its input filter and performs the
> > >> ap_get_brigade call.
> > >
> > >
> > > Up to some, sane limit.  I wouldn't want us pulling more than 64k or
> > > without
> > > some extra thought.
> >
> > of course.
> 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.

2) Installed Apache 1.x-style - In this case, apreq, when called upon, will
simply start slurping in the data all by itself.  However, in such a case,
it will either not use ap_get_brigade to get the data, or continuously call
ap_get_brigade until it gets EOS.  But implementing apreq like this will not
allow another application to call ap_get_brigade at its' own pace, or if it
does, apreq will choke on the missing data.

Joe, you seem to be seeing some third possibility which I must be missing,
as your comment doesn't fit either of these scenarios...  (Please don't
flame me too bad if I'm making some stupid error - this is the first time
I'm being brave enough to comment on anything Apache2 API related :-))


Maybe in order to understand mankind, we have to look at the word itself:
"Mankind". Basically, it's made up of two separate words - "mank" and "ind".
What do these words mean ? It's a mystery, just as is mankind.

View raw message