Memory leak of Apache module - libapreq

2008-12-15 Thread Lin Luo
I have been using libapreq2-2.08.lib to develop my apache module. My module is severely leaked. I then checked libapreq and found it also has slighly memory leak but not severe like mine. My questions is: 1. I only used Apache pool to allocate memory (apr_palloc, apr_pcalloc) and manage the lifecy

Re: Reading request body an writing it back to the chain

2008-12-15 Thread Ferdinand Arndt
On Dec 15, 2008, at 1:16 PM, Ivan Ristic wrote: On Mon, Dec 15, 2008 at 11:30 AM, Ferdinand Arndt wrote: On Dec 15, 2008, at 12:10 PM, Ivan Ristic wrote: You can look at how ModSecurity (http://www.modsecurity.org) does it: you can read the request body and store it somewhere, then you

Reading request body an writing it back to the chain

2008-12-15 Thread Ferdinand Arndt
Hi, I am trying to make a module that does the following: 1. Reading the request body 2. Checking the data with some regex 3. Setting some environment variables The environment variables are for later processing with mod_rewrite. My problem is, how to write the content of the request back to t

Re: Reading request body an writing it back to the chain

2008-12-15 Thread Ivan Ristic
You can look at how ModSecurity (http://www.modsecurity.org) does it: you can read the request body and store it somewhere, then you insert and input filter that sends data from the buffer down the chain and removes itself from the chain once it's done. You can choose where you're reading the requ

Re: proxy - as a Handler or a Filter?

2008-12-15 Thread Jodi Bosa
> I need to do write a proxy protocol converter and have not found any comparable examples - basically a proxy that is communicating HTTP with a client but communicates in another protocol with a backend server - with multiple requests & responses on same connection (so basically KeepAlive's betwee

Re: proxy - as a Handler or a Filter?

2008-12-15 Thread Eric Covener
On Mon, Dec 15, 2008 at 12:32 PM, Jodi Bosa wrote: >> Right now I am thinking of writing this as an Apache Handler that reads > data from a client into a Bucket Brigade and then the Handler create it's > own Filter chain and invokes the Filter chain on that Bucket Brigade. I would suggest impleme