Breaking the rules

From: Dancer <dancer@dont-contact.us>
Date: Wed, 29 Apr 1998 17:08:09 +1000

--MimeMultipartBoundary
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

With reference to a couple recent posts (mine and others) on
squid-users, I'm looking at ways to implement selective
'rules-violations' in squid 1.2.

Essentially, they amount to limited bypassing of the normal processing
rules, with the intention that they can be compiled in, or left out, and
that they provide absolutely minimal changes to the squid code.

For real examples, here's things that I am asked to do to squid (in a
professional capacity) by my clients:
* Log CGI arguments posted with GET. (ie: Prevent truncation of the URL
at the '?' before logging) One client uses this for research, another
uses this for (believe it or not) dynamic search-query rewriting, after
post-processing the logs...in other words, they have software scan the
logs each day, and a program updates redirector rules to rewrite search
queries to common search engines for better results. Another client (the
schoolsnet project) uses this as a part of the school's filtering
requirements, and wants the arguments logged.

* Prevent some patterns from aging. Currently, I implement this as a
'magic number' (a max of 1 or 4320, depending on circumstance)
indicating that an refresh.c should always pronounce the object fresh,
if it is in the cache.

* Prevent some patterns from being reloaded, regardless of the wishes of
the client. This one's trickier. I use a similar magic-number system for
refresh_patterns but it requires a little extra fiddling around to allow
negatively-cached objects to be reloaded, and other cached objects to
always be delivered from the cache.

All of these are real-world uses, justified by real needs. This is the
sort of stuff I end up patching into each squid.

My question, therefore, is: Should I fold these options into squid 1.2
as she is being developed, so that other people (perhaps with similar
needs to 'break-the-rules' on occasion) can also make use of this sort
of thing.

Also, I dislike the 'magic-number' solutions. It makes for minimal code
alteration, but feels a little too arcane and confusing. Just the
thought of fielding numerous questions on the operation makes me
shudder. Some kind of directive or flag to refresh_pattern would seem
the better option for those.

Comments, thoughts, thrown objects?

D

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GAT d- s++: a C++++$ UL++++B+++S+++C++H++U++V+++$ P+++$ L+++ E-
W+++(--)$ N++ w++$>--- t+ 5++ X+() R+ tv b++++ DI+++ e- h-@ 
------END GEEK CODE BLOCK------
--MimeMultipartBoundary--
Received on Tue Jul 29 2003 - 13:15:48 MDT

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