[squid-users] squirm 1.23 conditional redirect to a local mirror patch

It's been a while since I last played with squirm, but I put
together a quick and ugly hack to squirm 1.23 to help optimise
our setup.

We have squid running for a smallish group of users, and we also keep
mirrors of various site - ximian, redhat, suse, security updates, etc.
I was redirecting unconditionally to the local mirror, and occasional
problems would crop up with the mirror being out of sync.

To fix this, I added an optional 4th field to regex/regexi lines,
which is a 'disk_mirror_replacement' field. It works in a similar way
to a normal regex(i) redirection, but only if the file exists is the
redirection done.

Thanks for the efforts you made putting squirm together in the first
place!

Cheers,

Mark

--
+-------------------------------------------------------------------------+
Mark Cooke The views expressed above are mine and are not
Systems Programmer necessarily representative of university policy
University Of Birmingham URL: http://www.sr.bham.ac.uk/~mpc/
+-------------------------------------------------------------------------+