kazak has asked for the wisdom of the Perl Monks concerning the following question:
<- http://bl.com/Sorry=http://example.com/stats/ <- BAD response
Proxy must:
1. Detect: *Sorry* in URI returned in response
2. Cut off "http://bl.com/Sorry="
3. Repeat "http://example.com/stats/" through other proxy.
4. Return content to client.
I decided to try write it perl. But it just to hard to me with knowledges i have at this point. I found HTTP::Proxy and managed to start simple proxy-example from the CPAN ( I installed LWP::UserAgent HTTP::Daemon made #export http_proxy=http://127.0.0.1:3128/) Example:But how to move forward, what next? I just have no clue :(.use HTTP::Proxy; # initialisation my $proxy = HTTP::Proxy->new( port => 3128 ); # alternate initialisation my $proxy = HTTP::Proxy->new; $proxy->port( 3128 ); # the classical accessors are here! # this is a MainLoop-like method $proxy->start;
Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Proxy repeater
by onelesd (Pilgrim) on Oct 17, 2011 at 21:28 UTC | |
by kazak (Beadle) on Oct 18, 2011 at 07:24 UTC |