6 my $ua = LWP::UserAgent->new(keep_alive => 1);
8 my $req = HTTP::Request->new(GET => "http://jigsaw.w3.org/HTTP/ChunkedScript");
9 my $res = $ua->request($req);
11 print "not " unless $res->is_success && $res->content_type eq "text/plain";
14 print "not " unless $res->header("Client-Transfer-Encoding") eq "chunked";
17 for (${$res->content_ref}) {
19 /Below this line, is 1000 repeated lines of 0-9/ || die;
22 my @lines = split(/^/);
23 print "not " if @lines != 1000;
26 # check that all lines are the same
27 my $first = shift(@lines);
30 $no_they_are_not++ if $_ ne $first;
32 print "not " if $no_they_are_not;
35 print "not " unless $first =~ /^\d+$/;