Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7740272
  • 博文数量: 637
  • 博客积分: 10265
  • 博客等级: 上将
  • 技术积分: 6165
  • 用 户 组: 普通用户
  • 注册时间: 2004-12-12 22:00
文章分类

全部博文(637)

文章存档

2011年(1)

2010年(1)

2009年(3)

2008年(12)

2007年(44)

2006年(156)

2005年(419)

2004年(1)

分类: 系统运维

2005-10-12 18:08:45

Hello,
I had the same problem, discovering that jesred redirector doesn't support the
POST method very well.
I wrote a my own redirector, very simple, in perl: probably it doesn't have
great performance, but works for me:

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.

Ciao
阅读(2219) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~