Click here to get back home

Using HTTP::Proxy

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Using HTTP::Proxy ralph 09-23-2004
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! =-----


Similar ThreadsPosted
HTTP::Proxy and not using 127.0.0.1 May 11, 2006, 6:10 pm
HTTP::Proxy - how to detect start and end of URL fetch September 26, 2004, 6:00 am
LWP, https and a proxy February 22, 2005, 7:43 am
DBI/DBD-Oracle and Proxy June 13, 2007, 11:43 am
PPM through Proxy (Activeperl / Activestate) July 14, 2005, 1:37 pm
wsp, Firefox proxy and ports August 21, 2007, 9:08 pm
mod_perl and proxy settings May 26, 2008, 3:03 pm
Net::Telnet -- does it support Proxy or SOCKS connections? August 4, 2005, 11:10 pm
SOLVED: Running MCPAN behind an authenticating proxy server (kludge) November 23, 2004, 1:05 pm
XML-RPC over HTTP with SSL January 17, 2005, 10:08 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap