Hi!

On Sun, May 11, 2008 at 07:10:27PM +0100, Leon Brocard wrote:
> 2008/5/10 Daniel McBrearty <[EMAIL PROTECTED]>:
> 
> > I'd like Leon's opinion on this. Forwarding to him again.
> 
> I understand many bits of it but have given up trying to get it
> working. I would love a patch which passes tests on both old and new
> lib-www-perls.

Today we where hit by this, and I dug into the code...

The problems seems to lie in WWW::Mechanize and 
Test::WWW::Mechanize::Catalyst.

I was able to (sort of) fix it with the attached two patches.

T:W:M:C tests work after those patches (as do our tests...), but 
WWW::Mechanize spews some "Parsing of undecoded UTF-8 will give garbage 
when decoding entitie" warnings. And I'm not in the mood for utf8 
debugging ...

I have to say that I did not analyse the whole problem, and in fact we 
just downgrade to libwww-perl-5.808. But if these findings help someone 
with deeper knowledge to really solve the problem, I'd be delighted!

-- 
#!/usr/bin/perl                              http://domm.plix.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
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>
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;
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to