Skip Menu |
 

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 37758
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: andrew.benham [...] thus.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Request to remove t/live/jigsaw-chunk.t
Date: Thu, 17 Jul 2008 15:05:20 +0100
To: bug-libwww-perl [...] rt.cpan.org
From: Andrew Benham <andrew.benham [...] thus.net>
Download (untitled) / with headers
text/plain 2.8k
All (recent ?) versions of libwww-perl include the t/live/jigsaw-chunk.t test script. This relies on an external http server providing http://jigsaw.w3.org/HTTP/ChunkedScript Unfortunately the external server occasionally serves incorrect content, and the test fails. I've had a response from the Jigsaw people to my bug report, so I think the solution is probably to delete the test from libwww-perl. Show quoted text
-------- Original Message -------- Subject: Occasional bug in http://jigsaw.w3.org/HTTP/ChunkedScript Date: Wed, 28 May 2008 15:50:14 +0100 From: Andrew Benham <andrew.benham@thus.net> To: jigsaw@w3.org Sirs: Our package build system occasionally suffers test failures when building the Perl module libwww-perl (http://search.cpan.org/~gaas/libwww-perl-5.812/) This Perl code have a test case (attached) which essentially retrieves the URL http://jigsaw.w3.org/HTTP/ChunkedScript and checks that all the lines (apart from your first 3 body lines) are the same. This is test 4 in the attached file. Now occasionally test 4 fails - we're talking maybe 1 time in 100 invocations. This isn't the end of the world, but nevertheless it's annoying. So I repeatedly ran the test case whilst running Wireshark to monitor the traffic to your web server. And lo, when the test fails Wireshark shows that the response doesn't contain identical lines :-( The Wireshark trace file is attached ('bad_response'). If you follow the TCP stream then you'll see that about three-quarters of the way through the file your server has sent: 01234567890123456789012345678901234567890123456789012345678901234567890 01234567890123456789012345678901234567890123456789012345678901234567890 01234567890123456789012345678901234567890123456789012345678901234567890 01234567890123456789012345678901234567890123456789012345678901234589012345678901234567890123456789012345678901234567890 01234567890123456789012345678901234567890123456789012345678901234567890 01234567890123456789012345678901234567890123456789012345678901234567890 01234567890123456789012345678901234567890123456789012345678901234567890 01234567890123456767890 01234567890123456789012345678901234567890123456789012345678901234567890 01234567890123456789012345678901234567890123456789012345678901234567890 01234567890123456789012345678901234567890123456789012345678901234567890 It looks like there's a '67' pair of chars which has been missed out of the long line at around column 67, but this pair of chars appear in the short line instead. The upshot is that the chunk size hasn't been altered, which is fortuitous. So I suspect there's some corner case in your code which can generate an incorrect response some of the time. It would be good if you could fix it please - despite your disclaimers about protocol conformance :-) I'm prepared to help in any way I can. -- Andrew Benham Demon@Thus andrew.benham@thus.net Finchley, London N3 2QQ, U.K. Tel: 020 8495 6343 Fax: 020 8495 6037
Download jigsaw-chunk.t
text/x-perl 900b
print "1..5\n"; use strict; use LWP::UserAgent; my $ua = LWP::UserAgent->new(keep_alive => 1); my $req = HTTP::Request->new(GET => "http://jigsaw.w3.org/HTTP/ChunkedScript"); my $res = $ua->request($req); print "not " unless $res->is_success && $res->content_type eq "text/plain"; print "ok 1\n"; print "not " unless $res->header("Client-Transfer-Encoding") eq "chunked"; print "ok 2\n"; for (${$res->content_ref}) { s/\015?\012/\n/g; /Below this line, is 1000 repeated lines of 0-9/ || die; s/^.*?-----+\n//s; my @lines = split(/^/); print "not " if @lines != 1000; print "ok 3\n"; # check that all lines are the same my $first = shift(@lines); my $no_they_are_not; for (@lines) { $no_they_are_not++ if ($_ ne $first); } print "not " if $no_they_are_not; print "ok 4\n"; print "not " unless $first =~ /^\d+$/; print "ok 5\n"; }
Download bad_response
application/octet-stream 79.2k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #37758] AutoReply: Request to remove t/live/jigsaw-chunk.t
Date: Thu, 17 Jul 2008 15:13:56 +0100
To: bug-libwww-perl [...] rt.cpan.org
From: Andrew Benham <andrew.benham [...] thus.net>
Download (untitled) / with headers
text/plain 335b
Whoops, a correction to my original report: | I've NOT had a response from the Jigsaw people to my bug report, so I think the solution is probably to delete the test from libwww-perl. -- Andrew Benham Demon@Thus andrew.benham@thus.net Finchley, London N3 2QQ, U.K. Tel: 020 8495 6343 Fax: 020 8495 6037
As of LWP-5.814 we will not default to running any of the live tests.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.