For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > February 2005 > A pipe or FH equivalent of LWP::UserAgent ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author A pipe or FH equivalent of LWP::UserAgent ?
Peter Billam

2005-02-25, 3:56 am

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
Ilya Zakharevich

2005-02-25, 3:56 am

[A complimentary Cc of this posting was sent to
Peter Billam
<contact.html@www.pjb.com.au>], who wrote in article <slrnd1t5sa.b6q.peter@pjb.dpiwe.tas.gov.au>:
> my $res = $ua->request($req);


....

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


Read the docs of request()?

Ilya
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com