httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch>
Subject Re: Connection filters and the proxy
Date Sun, 22 Aug 2010 10:15:26 GMT
On Sunday 22 August 2010, Graham Leggett wrote:
> I have a connection filter based on mod_dumpio that reads data
> coming into and out of the server, however this filter gets
> inserted twice - once normally within the normal filter stack, and
> a second time within the proxy's backend connection filter stack.
> I need the filter to be able to distinguish whether it is running
> normally or through a proxy, and a look in the mod_proxy code
> doesn't show a clear marker to indicate which conn_rec structure
> is which.

I have encountered this problem before. In mod_reqtimeout, I have used 
the process_connection hook for inserting the filter insteaad of the 
pre_connection hook, in order to avoid to insert it on backend 

In server/log.c, I have checked if c->sbh is NULL. I am not sure this 
is 100% reliable, but it is good enough to decide wether to log an 
address as "client" or "remote".

If there is no better method, maybe we should create one? Like adding 
a field to the conn_rec.

View raw message