|
Posted by ralph on September 23, 2004, 5:41 am
Please log in for more thread options
I am having trouble getting this to work. Can anyone tell
me what I am doing wrong? This is simple test code.
use HTTP::Proxy;
use HTTP::Proxy::BodyFilter::simple;
use HTTP::Proxy::BodyFilter::tags;
use LWP::RobotUA;
my $proxy = HTTP::Proxy->new;
$proxy->port( 3128 ); # the classical accessors are here!
$proxy->host(undef);
print "post setn";
$proxy->logmask(ALL);
# you can also use your own UserAgent
my $agent = LWP::RobotUA->new('my-robot/0.1', 'me@foo.com');
print "agent = $agentn";
$proxy->agent( $agent );
$proxy->push_filter(
mime => 'text/html',
response => HTTP::Proxy::BodyFilter::tags->new(),
response =>
HTTP::Proxy::BodyFilter::simple->new( sub { s!html!HTML!ig } )
);
# this is a MainLoop-like method
$proxy->start;
I run this on my server (Linux). I get no error messages at all.
Then, from the command line on my server, I try
lwp-download http://www.barfola.com:3128/foo.html
And lwp-download just hangs. Am I doing (or attempting) something
dumb?
ThanksInAdvance!
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
|