Re: [squid-users] Replacing an image based on the refer...

From: John Doe <jdmls_at_yahoo.com>
Date: Wed, 13 Aug 2008 05:30:48 -0700 (PDT)

> > The problem is that the rewriting can be complex and context dependant...
> > By example: only big abusers images will be changed (decision needs an
> external script).
> > Other example: *.small.* -> *.320.*, etc...
> > I need an external script that can handle complex cases.
> > So, can I have more than one url_rewrite "blocks"?
>
> Not in current squid.
> There is the possiility of multiple external_acl_type though.

Arg...

So, just to be sure, there is no way to rewrite (or not) an URL based on some headers analysis?
Basicaly, I need the input parameters of external_acl and the output of url_rewrite.
If
not, do you think it would be easy for me (basic C knowledge) to patch
squid source to add at least the referer to url_rewrite input.
Or,
could I use a dirty trick like 'user=NEWURL' set by external_acl helper
program and then get it from url_rewrite input parameters...?
So far we don't need authentification, but can the variable handle an URL...
Another
solution would have been the 2 helpers (external and rewrite) directly
talking to each other (external tells rewrite "I denied this request,
rewrite it please"); but there is no good way to identify a request
(like the Unique sequence number).

Does anyone know some way to do this...?

Thx,
JD

      
Received on Wed Aug 13 2008 - 12:30:57 MDT

This archive was generated by hypermail 2.2.0 : Wed Aug 13 2008 - 12:00:03 MDT