link-checker commit: Require libwww-perl >= 5.802.

changeset:   229:be779c7251c7
user:        ville
date:        Mon Apr 21 07:26:33 2008 +0000
files:       Makefile.PL bin/checklink docs/checklink.html
description:
Require libwww-perl >= 5.802.


diff -r a546e8de7f77 -r be779c7251c7 Makefile.PL
--- a/Makefile.PL	Mon Apr 21 07:09:53 2008 +0000
+++ b/Makefile.PL	Mon Apr 21 07:26:33 2008 +0000
@@ -1,19 +1,5 @@
 use 5.00503;
 use ExtUtils::MakeMaker;
-
-eval {
-  require LWP;
-  if ($LWP::VERSION eq "5.76") {
-    print STDERR <<'EOF';
-
-*** Warning: it is not recommended to use this version of link checker with
-*** libwww-perl version 5.76.  Version 5.76 of libwww-perl has a bug which
-*** may cause the link checker to follow redirects to file: URLs.
-
-EOF
-  }
-};
-
 
 WriteMakefile(
   NAME          => 'W3C::LinkChecker',
@@ -24,7 +10,7 @@
                      CGI             => 0,
                      Config::General => 2.06,
                      HTML::Parser    => 3.20,
-                     LWP             => 5.66,
+                     LWP             => 5.802,
                      Net::IP         => 0, # Optional, see the docs.
                      Term::ReadKey   => 2.00,
                      Time::HiRes     => 0,
diff -r a546e8de7f77 -r be779c7251c7 bin/checklink
--- a/bin/checklink	Mon Apr 21 07:09:53 2008 +0000
+++ b/bin/checklink	Mon Apr 21 07:26:33 2008 +0000
@@ -5,7 +5,7 @@
 # (c) 1999-2008 World Wide Web Consortium
 # based on Renaud Bruyeron's checklink.pl
 #
-# $Id: checklink,v 4.99 2008-04-21 07:09:53 ville Exp $
+# $Id: checklink,v 4.100 2008-04-21 07:26:33 ville Exp $
 #
 # This program is licensed under the W3C(r) Software License:
 #       http://www.w3.org/Consortium/Legal/copyright-software
@@ -181,7 +181,7 @@
 use HTML::Entities       qw();
 use HTML::Parser    3.20 qw(); # >= 3.20 for "line" argspec identifier
 use HTTP::Request        qw();
-use HTTP::Response       qw();
+use HTTP::Response  1.50 qw(); # >= 1.50 for decoded_content()
 use Time::HiRes          qw();
 use URI                  qw();
 use URI::Escape          qw();
@@ -242,7 +242,7 @@
   $PROGRAM     = 'W3C-checklink';
   $VERSION     = '4.3';
   $REVISION    = sprintf('version %s (c) 1999-2008 W3C', $VERSION);
-  my ($cvsver) = q$Revision: 4.99 $ =~ /(\d+[\d\.]*\.\d+)/;
+  my ($cvsver) = q$Revision: 4.100 $ =~ /(\d+[\d\.]*\.\d+)/;
   $AGENT       = sprintf('%s/%s [%s] %s',
                          $PROGRAM, $VERSION, $cvsver, LWP::RobotUA->_agent());
 
@@ -1092,20 +1092,18 @@
     $failed_reason = "Content-Type for <$request_uri> is " .
       (defined($ct) ? "'$ct'" : 'undefined');
   } else {
-    if ($response->can('decoded_content')) { # LWP >= 5.802
-      # Pre-decode Content-Encoding.
-      # @@@TODO: maybe also decode charsets?
-      my $docref = $response->decoded_content(ref => 1, charset => 'none');
-      if (defined($docref)) {
-        $response->content_ref($docref);
-        # Remove Content-Encoding so it won't be decoded again later.
-        $response->remove_header('Content-Encoding')
-      } else {
-        my $ce = $response->header('Content-Encoding');
-        $ce = defined($ce) ? "'$ce'" : 'undefined';
-        $ct = defined($ct) ? "'$ct'" : 'undefined';
-        $failed_reason = "Error decoding document at <$request_uri>, Content-Type $ct, Content-Encoding $ce: '$@'";
-      }
+    # Pre-decode Content-Encoding.
+    # @@@TODO: maybe also decode charsets?
+    my $docref = $response->decoded_content(ref => 1, charset => 'none');
+    if (defined($docref)) {
+      $response->content_ref($docref);
+      # Remove Content-Encoding so it won't be decoded again later.
+      $response->remove_header('Content-Encoding')
+    } else {
+      my $ce = $response->header('Content-Encoding');
+      $ce = defined($ce) ? "'$ce'" : 'undefined';
+      $ct = defined($ct) ? "'$ct'" : 'undefined';
+      $failed_reason = "Error decoding document at <$request_uri>, Content-Type $ct, Content-Encoding $ce: '$@'";
     }
   }
   if ($failed_reason) {
diff -r a546e8de7f77 -r be779c7251c7 docs/checklink.html
--- a/docs/checklink.html	Mon Apr 21 07:09:53 2008 +0000
+++ b/docs/checklink.html	Mon Apr 21 07:26:33 2008 +0000
@@ -6,7 +6,7 @@
     <title>W3C Link Checker Documentation</title>
     <link rev="made" href="mailto:www-validator@w3.org" />
     <style type="text/css" media="all">@import "linkchecker.css";</style>
-    <meta name="revision" content="$Id: checklink.html,v 1.43 2008-02-10 12:02:29 ville Exp $" />
+    <meta name="revision" content="$Id: checklink.html,v 1.44 2008-04-21 07:26:33 ville Exp $" />
   </head>
 
   <body>
@@ -142,7 +142,7 @@
 	  <li><a href="http://search.cpan.org/dist/CGI.pm/">CGI.pm</a> (required for CGI mode only)</li>
           <li><a href="http://search.cpan.org/dist/Config-General/">Config-General</a> (optional, version 2.06 or newer; required only for reading the (optional) configuration file)</li>
 	  <li><a href="http://search.cpan.org/dist/HTML-Parser/">HTML-Parser</a> (version 3.20 or newer)</li>
-	  <li><a href="http://search.cpan.org/dist/libwww-perl/">libwww-perl</a> (version 5.66 or newer; version 5.70 or newer recommended, except for 5.76 which has a bug that may cause the link checker follow redirects to <code>file:</code> URLs)</li>
+	  <li><a href="http://search.cpan.org/dist/libwww-perl/">libwww-perl</a> (version 5.802 or newer)</li>
           <li><a href="http://search.cpan.org/dist/Net-IP/">Net-IP</a> (optional but recommended; required for restricting access to <a href="http://www.ietf.org/rfc/rfc1918.txt">private IP addresses</a>)</li>
           <li><a href="http://search.cpan.org/dist/TermReadKey/">TermReadKey</a> (optional but recommended; required only in command line mode for password input)</li>
 	  <li><a href="http://search.cpan.org/dist/Time-HiRes/">Time-HiRes</a></li>
@@ -302,7 +302,7 @@
         alt="Valid XHTML 1.0!" /></a>
       <a title="Send Feedback for the W3C Link Checker"
         href="http://validator.w3.org/feedback.html">The W3C Validator Team</a><br />
-      $Date: 2008-02-10 12:02:29 $
+      $Date: 2008-04-21 07:26:33 $
     </address>
     <p class="copyright">
       <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> &copy; 1994-2008

Received on Thursday, 5 August 2010 14:47:26 UTC