Connection filter for forward proxy
I am trying to write what I assume will be a connection filter for use with mod_proxy in forward proxy mode. I would like the filter to be able to selectively chain proxy requests, kind of like ProxyRemote except with far more granular control. Can someone give me an idea of where I should start ? Thanks in Advance
Re: Connection filter for forward proxy
This may be a silly question but how would I go about giving mod_proxy some knowledge about another module which it should call if the module is installed ? Obviously, I understand how I could hack mod_proxy itself in order to tweak the selection but I do not understand how mod_proxy could: 1. Check for the presence of a module 2. Given that the module is present, somehow ask the module to return the correct proxy. Again, this all makes sense when I think of it in terms of a shared libraries but not so much as Apache Modules. Am I missing something basic ? Eric Covener wrote: On Thu, Jun 12, 2008 at 10:47 PM, Peter Belau [EMAIL PROTECTED] wrote: I am trying to write what I assume will be a connection filter for use with mod_proxy in forward proxy mode. I would like the filter to be able to selectively chain proxy requests, kind of like ProxyRemote except with far more granular control. Can someone give me an idea of where I should start ? If the implementation of ProxyRemote does everything you need, but it doesn't allow for dynamic configuration, you should develop a patch that allows it to call out to another module to determine the next proxy. Or, add hooks to let mod_rewrite do it via setting some note. I don't think you want to be in the business of duplicating this stuff or trying to subvert the request during an input filter
RE: Rewriting the Url
I believe that you can do this with mod_rewrite. You don't need to reinvent this particular wheel unless your rewriting logic is particularly hairy. -Original Message- From: Ram Prasanna [mailto:[EMAIL PROTECTED] Sent: Thu 2/28/2008 10:10 PM To: modules-dev@httpd.apache.org Subject: Rewriting the Url I need to change the appended parameters of the get Request, before it gets processed by the default_handler. I have written an input filter, changed the r-uri, r-unparsed_uri and filename, however it seems it doesn't work. Actual uri - www.somedomain.com/index.html?view=xyz To be changed -www.somedomain.com/index.html I have searched for ?view in the uri and replaced ? with '\0'. While going out of my input filter all seems that the view gets replaced, but i am getting File doesnot exists error from default handler, on investigating more i found the r-finfo.filetype becames APR_NOFILE. Any suggestions? Thanks in Advance! -- meendar
Setting Content-Type in an Apache module
Hi, I'm trying to set the Content-Type header in my Apache module with no success. Initially I was trying to set the header using the APR table functions but a google search revealed that this would not work... for Apache 1.3. After looking at mod_mime_magic.c it seems that the Content-Type is set using the ap_set_content_type function. I tried using this function and have had no success with it as well. Does anyone have any idea what I'm possibly doing wrong ? Thanks, Peter
RE: Pool child
In my understanding r-pool lasts the duration of the request. As soon as the request is finished the memory should be marked for cleanup. -Original Message- From: Marco Spinetti [mailto:[EMAIL PROTECTED] Sent: Thu 2/7/2008 6:21 AM To: [EMAIL PROTECTED] Subject: Pool child I have a question about the pool of the child r-pool. I'm using apache 2.2 with prefork and I set MaxRequestsPerChild 0 (so a child should never dies). When my handler starts, I alloc all my needed memory from r-pool. When the handler finishes, the memory allocated from r-pool is free or not? Because the child never dies, I'd like to know if I have to free something or not. Best regards Marco
Getting Apache to dump core
Hi, Does anyone know how to get Apache running on Linux to successfully dump core on a segfault ? I'm seeing very rare segfaults on long-running Apache processes under high volume. Also, any info regarding probable segfault causes and sanity checks to make both in terms of configuration and module programming techniques much appreciated.
request headers in Apache input filer
Hi, I'm trying to add/modify request headers in an Apache input filter with no success. I can read existing headers with no problems but by the time I try to modify them they are already onto the wire. Can anyone lend some insight into why this happening and what I need to do differently ? Thanks, Peter