Skip Menu |

This queue is for tickets about the Test-WWW-Mechanize-Catalyst CPAN distribution.

Report information
The Basics
Id: 34802
Status: resolved
Priority: 0/
Queue: Test-WWW-Mechanize-Catalyst

People
Owner: Nobody in particular
Requestors: jgoulah [...] cpan.org
Cc:
AdminCc:

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



Subject: test cases fail on 0.41

Message body is not shown because it is too large.

This is a problem with the recent release of libwww-perl. I haven't been able to work around it yet.
Subject: test cases fail on 0.41 (new patch for libwww-perl helps?)
Yesterday I spotted a regression in the latest libwww-perl and was able to pinpoint and patch. You can grab the patch here: http://rt.cpan.org/Ticket/Display.html?id=35607 I have no idea if it is related to your test failures or not. Mark
From: danielmcbrearty [...] gmail.com
I took a look at this today. The issue seems to be todo with the following code added in HTTP::Message *_utf8_downgrade = defined(&utf8::downgrade) ? sub { utf8::downgrade($_[0], 1) or Carp::croak("HTTP::Message content must be bytes") } : sub { }; this sub is called in the new and also the _set_content methods. The latter causes the problem with the lines: # For some reason Test::WWW::Mechanize uses $response->content everywhere # instead of $response->decoded_content; $response->content( $response->decoded_content ); in T:W:M:C::_make_request() method. This downgrading of UTF8 to bytes is new in HTTP::Message, but I can only guess at the dev's real intentions, so have no idea as to whether the real problem lies there or in T:W:M:C itself. The UTF8 downgrading did not happen in previous versions of HTTP::Message though, and so I would guess that commenting out the croak is a fairly safe workaround for now, for those people who want to install this code without forcing. Of course, I could be wrong ... :-)
On Di. 29. Apr. 2008, 15:27:56, LBROCARD wrote: Show quoted text
> This is a problem with the recent release of libwww-perl. I haven't been > able to work around it yet.
here's a very rough workaround, that causes some warnings in WWW::Mechanize...
diff -ru Test-WWW-Mechanize-Catalyst-0.42/lib/Test/WWW/Mechanize/Catalyst.pm Test-WWW-Mechanize-Catalyst-0.42-patched/lib/Test/WWW/Mechanize/Catalyst.pm --- Test-WWW-Mechanize-Catalyst-0.42/lib/Test/WWW/Mechanize/Catalyst.pm 2008-04-29 21:25:55.000000000 +0200 +++ Test-WWW-Mechanize-Catalyst-0.42-patched/lib/Test/WWW/Mechanize/Catalyst.pm 2008-05-15 13:30:44.000000000 +0200 @@ -89,7 +89,6 @@ # For some reason Test::WWW::Mechanize uses $response->content everywhere # instead of $response->decoded_content; - $response->content( $response->decoded_content ); } return $response;
diff -ur WWW-Mechanize-1.34/lib/WWW/Mechanize.pm WWW-Mechanize-1.34-patched/lib/WWW/Mechanize.pm --- WWW-Mechanize-1.34/lib/WWW/Mechanize.pm 2007-12-10 07:31:20.000000000 +0100 +++ WWW-Mechanize-1.34-patched/lib/WWW/Mechanize.pm 2008-05-15 13:28:03.000000000 +0200 @@ -2148,7 +2148,7 @@ # See docs in HTTP::Message for details. Do we need to expose the options there? # use charset => 'none' because while we want LWP to handle Content-Encoding for # the auto-gzipping with Compress::Zlib we don't want it messing with charset - my $content = $res->decoded_content( charset => 'none' ); + my $content = $res->decoded_content(); $content = $res->content if (not defined $content); $content .= _taintedness(); Only in WWW-Mechanize-1.34-patched/: Makefile.old diff -ur WWW-Mechanize-1.34/t/local/log-server WWW-Mechanize-1.34-patched/t/local/log-server --- WWW-Mechanize-1.34/t/local/log-server 2007-08-27 02:47:30.000000000 +0200 +++ WWW-Mechanize-1.34-patched/t/local/log-server 2008-05-15 13:14:10.000000000 +0200 @@ -88,7 +88,7 @@ <a href="/foo1.save_log_server_test.tmp">Link foo1.save_log_server_test.tmp</a> <a href="/foo2.save_log_server_test.tmp">Link foo2.save_log_server_test.tmp</a> <a href="/foo3.save_log_server_test.tmp">Link foo3.save_log_server_test.tmp</a> - <a href="/o-umlaut">Löschen -- testing for o-umlaut.</a> + <a href="/o-umlaut">Löschen -- testing for o-umlaut.</a> <a href="/o-umlaut-encoded">St&ouml;sberg -- testing for encoded o-umlaut.</a> <table>
From: cpan [...] chrisdolan.net
On Thu May 15 07:40:52 2008, DOMM wrote: Show quoted text
> On Di. 29. Apr. 2008, 15:27:56, LBROCARD wrote:
> > This is a problem with the recent release of libwww-perl. I haven't been > > able to work around it yet.
> > here's a very rough workaround, that causes some warnings in > WWW::Mechanize...
The simplest workaround I've found is: "cpan install GAAS/libwww-perl-5.808.tar.gz" ;-)
Thanks, this is fixed in 0.50.
From: todd.e.rinaldo [...] jpmorgan.com
On Mon Oct 27 09:59:30 2008, LBROCARD wrote: Show quoted text
> Thanks, this is fixed in 0.50.
TWMC is on .44 right now. Are we jumping versions or are you referring to fixed in .50 of some other package? Thanks,
Whoops, I meant "Fixed in 0.44, which requires WWW::Mechanize 1.50". Cheers, Leon