You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Tess Flynn <tf...@mqsoftware.com> on 2006/11/29 22:31:32 UTC

One character per brigade?

I'm (desparately!) trying to write a filter module that gathers statistical data from both the request and the reply. I'm wrting it as an input filter for the request, and an output filter for the reply. I do *not* need associate the requests with the replies. I need the entire request (POST content) and the entire reply body in order to do what I need.

So far I've written a pair of functions that allocate a ctx and create an empty brigade for a buffer. Now I need to copy or move the data from the input brigades to my buffer brigade. How do I do this?

It also seems that I'm only getting one character per *brigade*, and multiple brigades for each request. How am I supposed to tell when I've read the last brigade?

Thanks!

-Tess

Re: One character per brigade?

Posted by Nick Kew <ni...@webthing.com>.
On Wed, 29 Nov 2006 15:31:32 -0600
"Tess Flynn" <tf...@mqsoftware.com> wrote:

> I'm (desparately!) trying to write a filter module that gathers
> statistical data from both the request and the reply. I'm wrting it
> as an input filter for the request, and an output filter for the
> reply. I do *not* need associate the requests with the replies. I
> need the entire request (POST content) and the entire reply body in
> order to do what I need.

Take a look at mod_diagnostics, which reports on exactly the data
you're looking for, and might be a good startingpoint for your module.

> So far I've written a pair of functions that allocate a ctx and
> create an empty brigade for a buffer. Now I need to copy or move the
> data from the input brigades to my buffer brigade. How do I do this?

If you're just examining the data but not modifying it, you don't
want to mess about with new brigades.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

Re: One character per brigade?

Posted by Joachim Zobel <jz...@heute-morgen.de>.
Am Mittwoch, den 29.11.2006, 15:31 -0600 schrieb Tess Flynn:
> How am I supposed to tell when I've read the last brigade?

The last bucket is an EOS bucket.

Sincerely,
Joachim