[PATCH] parameterize deny_info URL redirect

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 23 Sep 2009 00:56:33 +1200

It's long been an annoyance that deny_info will only accept the full
canonical URL requested via the %s parameter. Yet the error pages have a
full range of request and other details available to them.

That problem severely limits the possibilities of replacing url_rewrite
redirect with an HTTP-compliant deny_info 3xx redirect. To bounce people
from a.example.com/foo to b.example.com/foo for the simple case.

This patch opens most of the error page template % codes for use in
deny_info URL as well. With two alterations %s for back-compat remains
the full canonical URL instead of the Squid program signature. And %R
is leveraged from the full request headers to the URL-path (since error
pages had nothing existing and sensible).

NP: %P can be used to retain the protocol ie HTTP/HTTPS/FTP during the
jump :)

Now : is this acceptable as-is or do we need to begin discussions about
changing the % code tags to something more adaptable? (in-sync with
logformat for example.)

Amos

Received on Tue Sep 22 2009 - 12:56:41 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 22 2009 - 12:00:05 MDT