Re: as_string() output from ParallelUserAgent

Hideyuki Suzuki (hideyuki@sat.t.u-tokyo.ac.jp)
Sat, 06 Feb 1999 13:22:41 +0900


From: Hideyuki Suzuki <hideyuki@sat.t.u-tokyo.ac.jp>
Subject: as_string() output from ParallelUserAgent
Date: Fri, 05 Feb 1999 01:39:38 +0900

> ----------------
> #!/usr/local/bin/perl
> 
> use LWP::Parallel::UserAgent;
> use LWP::Debug qw(+);
> 
> $URL="http://mspd323s.ms.u-tokyo.ac.jp/";
> 
> $pua = new LWP::Parallel::UserAgent;
> $res = $pua->register(new HTTP::Request HEAD => $URL);
> $entries = $pua->wait();
> foreach $i (keys %$entries) {
>   $res = $entries->{$i}->response;
>   print $res->as_string();
> }
> ----------------

I should have written $res->headers_as_string() at the last 'print'
line.  Anyway, the result is similar.

For some specific URL (or server?), headers_as_string() usually does not
return the entire headers.  It seems that the problem occurs when the
answer was read from multiple chunks.

-- hideyuki