I use squid in accel mode, and my CGI scripts need to reconstruct the
client's originial URI. They can't get it from the CGI environment
variables because those are set by the accelerated httpd and reflect
the squid-to-httpd connection rather than client-to-squid.
So, I'd like squid to append a header, like, X-Forwarded-URI, which
contains the proto, host, port, and url that the client originally
submitted to squid.
Looking at "struct _clientHttpRequest" (structs.h:1008), I see "char
*uri" and "char *log_uri". Unfortunately, these contain the
accelerated host and port rather than the the host and port that the
client used to connect to squid.
My options are:
(1) change log_uri to contain the client's host and port
(2) add "char *client_uri" and put the client's uri there.
I'm going to do #2 right now, and add "X-Forwarded-URI" in
clientRedirectDone() (client_side.c:308).
Um, I hope I'm not reinventing the wheel. Has anyone else done this
yet?
--Noel
Received on Thu Aug 09 2001 - 20:13:21 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:10 MST