分类: 系统运维
2005-10-12 18:08:45
I used perl syntax for pattern-matching substituition:
s/
#!/usr/bin/perl
$|=1;
while (<>)
{
s@.host.com/my/path@@;
print;
}
It works in thie way: for any line in input, which comes from squid, every
occurrence of will be replaced by
, then the changed line is printed in the standard
output, taken by squid.
As you can see, it is very simple, probably it could be implemented with a
better logic, but at the moment I haven't time to do it.
Probably in the future I will try to modify also the JESRED redirector to
support also the POST method.