---------- Forwarded message ----------
Date: Tue, 17 May 2005 13:56:23 +1200
From: "Beamish-White, James, VF-NZ" <James.Beamish-White@vodafone.com>
To: Henrik Nordstrom <hno@squid-cache.org>
Subject: RE: Modifying User-Agent
Attached is the patch (generated from diff -Naur).
The main changes are made in HttpHeaderTools.c, but the error I am
getting is:
helperHandleRead: unexpected read from header_rewriter #1, 161 bytes
...which is debug in the helper.c file.
Thanks!
James
-----Original Message-----
From: Henrik Nordstrom [mailto:hno@squid-cache.org]
Sent: Tuesday, 17 May 2005 12:58 p.m.
To: Beamish-White, James, VF-NZ
Cc: squid-dev@squid-cache.org
Subject: Re: Modifying User-Agent
On Tue, 17 May 2005, Beamish-White, James, VF-NZ wrote:
> I have got some patch code that another developer did 4 years ago,
> which I'm trying to get to work against the current stable release of
> squid.
Ok.
> What we need to do is use squid to pass the User-Agent header to a
> helper (e.g. perl script) to rewrite as necessary. This is in
> particular to strip a -EMULATOR off phone names (e.g. User-Agent:
> SHARP-G3-EMULATOR) for a WAP/3G service. I have it mostly working, but
> there's an error when it does work, and if I also include the
> redirect_program directive in the squid.conf (a requirement), it hangs
> without response.
If you could post the patch it would be easier to help you out.
>From your problem description it sounds like the patch hooks into the
request flow in a sub-optimal manner..
If not done already I would probably add a lookup cache as well to avoid
repeated helper lookups for the same user-agent string.
Regards
Henrik
-----------------------------------------------------------------------------------------------
Have you seen our website?.... http://www.vodafone.co.nz
Manage Your Account, check your Vodafone Mail and send web2TXT online: http://www.vodafone.co.nz/myvodafone
CAUTION: This correspondence is confidential and intended for the named recipient(s) only.
If you are not the named recipient and receive this correspondence in error, you must not copy,
distribute or take any action in reliance on it and you should delete it from your system and
notify the sender immediately. Thank you.
Unless otherwise stated, any views or opinions expressed are solely those of the author and do
not represent those of Vodafone New Zealand Limited.
Vodafone New Zealand Limited
20 Viaduct Harbour Avenue, Private Bag 92161, Auckland 1030
Telephone + 64 9 355 2000
Facsimile + 64 9 355 2001
This archive was generated by hypermail pre-2.1.9 : Tue May 31 2005 - 12:00:03 MDT