Re: format specifiers in deny_info URL

From: ian j hart <ianjhart@dont-contact.us>
Date: Sun, 27 Jan 2008 20:13:58 +0000

On Tuesday 22 January 2008 23:21:11 ian j hart wrote:
> On Tuesday 22 January 2008 04:14:06 Henrik Nordstrom wrote:
> > On tis, 2008-01-22 at 00:04 +0000, ian j hart wrote:
> > > ref:
> > > http://www.mail-archive.com/squid-users%40squid-cache.org/msg52048.html
> > >
> > > Can someone please point me to the code which expands the URL.
> >
> > Only a sinlge %s is supported. Nothing else.
> >
> > from errorpage.c/cc:
> >
> > char *quoted_url =
> > rfc1738_escape_part(urlCanonical(err->request));
> > httpHeaderPutStrf(&rep->header, HDR_LOCATION, name, quoted_url);
> >
> > Use of other % codes will result in random garbage or even segfaults..
> >
> > Regards<html>
> > Henrik
>
> Drat!
>
> I know I'm going to regret this, but how difficult would this be to do?
>
> external_acl_message appears to be global!
>
> Cheers

To answer myself; this needs more work than I have time available. I want to go live tomorrow. A nice "wish list" project for someone, perhaps.

For the archive, I worked around this by writing an error template which does a redirect. e.g. [slight edit]

<head>
<title>Redirect</title>
<meta http-equiv="refresh" content="10;url=http://firewall/cgi-bin/banner?url=%u&cmd=%o">
<link rel="stylesheet" type="text/css" href="/style/default.css" />
</head>
<body>

Calculating the penalty. Please wait...
<p>If not redirected please select this link.

Tail of the file is printed by squid of course.

-- 
ian j hart
Received on Sun Jan 27 2008 - 13:14:15 MST

This archive was generated by hypermail pre-2.1.9 : Wed Jan 30 2008 - 12:00:09 MST