httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: REMOTE_* w/ ProxyPass
Date Thu, 01 Jul 1999 19:57:52 GMT

On Thu, 1 Jul 1999, Tony Finch wrote:

> Dean Gaudet <> wrote:
> >
> >Yeah squid works with any server; I just think it has some extra headers
> >it can insert when forwarding requests in a "reverse proxy" situation. 
> Squid already produces an X-Forwarded-For: header which contains the
> client's IP address (unless you turn it off). (If the request is piped
> through a chain of more than one Squid then the X-Forwarded-For:
> header will contain a record of the chain -- see posts to Usenet from
> DejaNews which uses Squid accelerators.) All Apache needs is an option
> to make it fake up REMOTE_* from this header. Accelerated virtual
> hosting would also benefit from modifying Squid to add an
> X-Server-Addr: header from which Apache can fake up SERVER_*.

Yeah, sounds like a simple job for mod_rewrite or a custom module.

> There is a slight problem, though: accelerators are allowed to pipe
> requests from multiple clients down the same connection, but Apache
> assumes that the client information is static for a given connection.
> Confusion between request_rec and conn_rec raises its ugly head again.

But aren't these headers present on each request going down the pipe? 

Oh I see your point -- if we insist on using REMOTE_foo and SERVER_foo
rather than HTTP_X_FORWARDED_FOR then you get into the confusion between
conn_rec and request_rec...


It's almost like we want a hook (and I'm sure this is something EAPI/KEAPI
solves) which says "please resolve this variable for me", which modules
can hook into... and the first module to resolve it wins.  The core would
resolve it from the usual location.

It's not that simple though, is it?  You need to be able to get the list
of variables... oh, and if they're truly "variable", rather than "a value
which is fixed for the length of one request" then you can't cache them...

oh joy.



> This is on my list of things to do when it needs to be done, but I doubt
> that time will come for a few months yet unless someone else wants the
> same thing. 
> Tony.
> -- 
> f.a.n.finch
> Winner, International Obfuscated C Code Competition 1998

View raw message