Don't ask to ask, just ask | |
PerlMonks |
Proxy repeaterby kazak (Beadle) |
on Oct 17, 2011 at 19:53 UTC ( [id://931996]=perlquestion: print w/replies, xml ) | Need Help?? |
kazak has asked for the wisdom of the Perl Monks concerning the following question:
Hi 2 all.
I have to implement the last but most important piece of my system - some proxy that will detect "bad responses" and repeat them through other parent proxy:
request -> http://example.com/stats ->
<- 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 :(. Thanks in advance.
Back to
Seekers of Perl Wisdom
|
|