Click here to get back home

A pipe or FH equivalent of LWP::UserAgent ?

 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
A pipe or FH equivalent of LWP::UserAgent ? Peter Billam 02-25-2005
Posted by Peter Billam on February 25, 2005, 3:12 pm
Please log in for more thread options


Greetings. Our front-line web server mostly does Apache Rewrites,
but we also have a little cgi script running there which does some
authentication and then uses LWP::UserAgent to

my $ua = LWP::UserAgent->new;
....
$req = HTTP::Request->new("GET" =>"$URL");
....
my $res = $ua->request($req);

and then gives the whole result to the browser. The trouble is, it's
now being used on some large pages, which is running our front-line
server out of memory and causes browser-timeouts and user-retries :-(

What I think I need is some way of reading the data from the Request
a few Kb at a time, and feeding it to the browser in real time,
as it comes in :-)

Dear LWP and HTTP folks, what's the way to do this ?

--

All help gratefully received, Regards, Peter

Peter Billam, DPIWE/ILS/CIT/Servers, hbt/lnd/l8, 6233 3061


Posted by Ilya Zakharevich on February 25, 2005, 6:58 am
Please log in for more thread options


[A complimentary Cc of this posting was sent to
Peter Billam
> my $res = $ua->request($req);

....

> Dear LWP and HTTP folks, what's the way to do this ?

Read the docs of request()?

Ilya


Similar ThreadsPosted
equivalent of /dev/tty in Windows ? October 6, 2006, 1:41 am
Having a problem with a short pipe read February 23, 2005, 8:58 am
flush writing to multiple children IO::Pipe April 29, 2005, 12:36 pm
Not able to use LWP::UserAgent::Authenticated December 26, 2005, 9:11 pm
LWP::UserAgent and HTTP_ACCEPT January 24, 2006, 7:03 pm
LWP:Simple/LWP:UserAgent (newbie) February 24, 2005, 12:11 pm
URGENT: no response - LWP::UserAgent February 26, 2005, 12:22 pm
Using HTTPS with LWP::UserAgent = Bad Service March 30, 2005, 6:45 am
installing LWP::UserAgent on windows June 21, 2005, 10:37 pm
newbie LWP::UserAgent questions August 13, 2006, 8:10 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap