Redirector

From: Darrin Thompson <dthompson@dont-contact.us>
Date: Tue, 06 Nov 2001 10:15:21 -0500

Hi all. This is my first post.

I'm switching my company's custom filtering proxy to use Squid instead
of Apache's proxy. I'm finding that squid's method of passing info to
the redirector program lacks structure so I'm planning to patch squid
2.4 STABLE1 with a more structured method. (What if the url and referer
both have a space in them... blah blah blah.) Also, I'm going to (for
our own use) add the HTTP Referer header to the info that squid passes
to the redirector.

I'm aware of the config option for escaping whitespace. My customers are
good at finding sites which break when stuff is escaped in the url. So
I'd like to leave the url alone. And what about the referer, and
username? etc. I'd like to deal with the whitespace problem more generally.

Just want to make sure I'm not duplicating something already done:

I'm going to change the sprintf in redirector.c to send the data like
this... "%d:%s,%d:%s,..." strlen(url), url, strlen(ip),ip... It may end
up a hair more complicated but you get the idea. This frames the data
and makes whitespace in the url or anything else mostly a non-issue.

Also, I found out how to grab the Referer header. I'm basically just
going to pass a pointer to the referer header to sprintf. Are there any
tricky memory management issues I need to be aware of?

Thanks for your time.

Darrin
Received on Tue Nov 06 2001 - 08:15:24 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:37 MST