[squid-users] URI suffix remove

From: Jose Celestino <japc@dont-contact.us>
Date: Sat, 11 Mar 2006 01:29:34 +0000

Had a problem similar to http://www.squid-cache.org/mail-archive/squid-users/200501/0278.html
that is: to be able to ignore the suffix of the URI for caching and retrieving
purposes.

For example imagine you have the following URI request:

/mybanners/468x60N/lrec-pink3.swf?clicktag=http%3A//bverv.pt/event/Tffggfdf86%2C93%2C101%2C110%2C150%2C182%2C204%2C2674%2C2675%2C2679%2C3493%2C3671%2C3824%2C3854%2C4228%2C4252%2C6199%2C6363%2C6548%2C6650%2C6701%2C6824%2C6883%2C6884%2C6897%2C6971%2C7308%2C7309%2C73186%2C93%2C101%2C110%2C150%2C182%2C204%2C2674%2C2675%2C2679%2C3493%2C3671%2C3824%2C3854%2C4228%2C4252%2C6199%2C6363%2C6548%2C6650%2C6701%2C6824%2C6883%2C6884%2C6897%2C6971%2C7308%2C7309%2C731

In a not uncommon scenario files like these are served by a squid proxy.
And there's, of course, no server side use for that mumbo-jumbo.

But you either end not caching it or caching useless, always diferent, objects.

The solution would be to discard everything after (and including) the 1st '?'.

I've added a patch to do that:

# TAG: uri_ender
# A list of words/character which, if found in a URI, cause the remaining
# of the URI, including this word/character to be ignored as if non-existant
#
#Default:
# none

It may be of use to someone and, most important, i'll have an easier time
finding it on the list archives than on the laptop.

Applies to squid-2.5.STABLE12.

-- 
Jose Celestino | http://xpto.org/~japc/files/japc-pgpkey.asc
----------------------------------------------------------------
"You just have to accept that some days you are the pigeon,
and some days you are the statue." - David Brent

Received on Fri Mar 10 2006 - 18:29:01 MST

This archive was generated by hypermail pre-2.1.9 : Sat Apr 01 2006 - 12:00:03 MST