[squid-users] Filter using request and response

From: Juan Asensio Sánchez <okelet_at_gmail.com>
Date: Fri, 19 Dec 2008 19:20:38 +0100

Hi

I need to write a script and integrate it into Squid. This script must
have access to the IP address of the client, the requested URL, the
method, some request headers and the content-type of the response.
According to this, if the user has made a number of this tye of
requests (a counter stored in a database that is incremented with each
text/html response), the response is text/html, the request method is
GET and some other request headers matching (not to be an xmlhttp
request, then the returned URL to the user, would not be the original,
because he is redirected to a page with and advertisement with a link
to the original URL, so when the user clicks in that link again, the
counter condition should not match and the original URL is requested
again, and returned to the user.

What is the best way to do this? With redirectors I have not access to
request headers neither the response.

Regards and thanks in advance.
Received on Fri Dec 19 2008 - 18:20:42 MST

This archive was generated by hypermail 2.2.0 : Sat Dec 20 2008 - 12:00:02 MST