Skip Menu |

This queue is for tickets about the LWP-ConnCache-MaxKeepAliveRequests CPAN distribution.

Report information
The Basics
Id: 69146
Status: resolved
Priority: 0/
Queue: LWP-ConnCache-MaxKeepAliveRequests

People
Owner: Nobody in particular
Requestors: david.storrs [...] gmail.com
Cc:
AdminCc:

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



Subject: Patch for Content-Type tests
Date: Sat, 25 Jun 2011 01:46:17 -0700
To: bug-LWP-ConnCache-MaxKeepAliveRequests [...] rt.cpan.org
From: David Storrs <david.storrs [...] gmail.com>
Hi Leon, Installing LWP-ConnCache-MaxKeepAliveRequests on my MBP OSX 10.5.8 with perl 5.10.1 fails. The test is checking for a specific charset on the return value (iso-8859-1), but http://search.cpan.org is returning simply 'text/html' to me. I loosened the test definition as follows and it passes and appears to work. The patch is included; I hope it helps. Dave root@loki:~/.cpanm/latest-build/LWP-ConnCache-MaxKeepAliveRequests-0.32/t$ diff -u simple.t.orig simple.t --- simple.t.orig 2011-06-25 01:11:25.000000000 -0700 +++ simple.t 2011-06-25 01:38:33.000000000 -0700 @@ -14,14 +14,14 @@ ); my $response = $ua->get('http://search.cpan.org/'); -is( $response->header('Content-Type'), 'text/html; charset=iso-8859-1' ); +like( $response->header('Content-Type'), qr{text/html}, 'Response header is as expected' ); is( $response->header('Client-Response-Num'), 1 ); $response = $ua->get('http://search.cpan.org/'); -is( $response->header('Content-Type'), 'text/html; charset=iso-8859-1' ); +like( $response->header('Content-Type'), qr{text/html}, 'Response header is as expected' ); is( $response->header('Client-Response-Num'), 2 ); $response = $ua->get('http://search.cpan.org/'); -is( $response->header('Content-Type'), 'text/html; charset=iso-8859-1' ); +like( $response->header('Content-Type'), qr{text/html}, 'Response header is as expected' ); is( $response->header('Client-Response-Num'), 1 );
Thanks, this will be fixed in 0.33. Leon