- From: Mercurial notifier <nobody@w3.org>
- Date: Thu, 05 Aug 2010 14:47:15 +0000
- To: link-checker updates <www-validator-cvs@w3.org>
changeset: 249:5aa5456a76b4 user: ville date: Sat Oct 25 19:27:10 2008 +0000 files: bin/checklink description: If running LWP >= 5.814, set Accept-Encoding in requests to what LWP can decode. diff -r 8d080200f1b9 -r 5aa5456a76b4 bin/checklink --- a/bin/checklink Sat Oct 25 19:22:46 2008 +0000 +++ b/bin/checklink Sat Oct 25 19:27:10 2008 +0000 @@ -5,7 +5,7 @@ # (c) 1999-2008 World Wide Web Consortium # based on Renaud Bruyeron's checklink.pl # -# $Id: checklink,v 4.119 2008-10-25 19:22:46 ville Exp $ +# $Id: checklink,v 4.120 2008-10-25 19:27:10 ville Exp $ # # This program is licensed under the W3C(r) Software License: # http://www.w3.org/Consortium/Legal/copyright-software @@ -259,7 +259,7 @@ $PROGRAM = 'W3C-checklink'; $VERSION = '4.3'; $REVISION = sprintf('version %s (c) 1999-2008 W3C', $VERSION); - my ($cvsver) = q$Revision: 4.119 $ =~ /(\d+[\d\.]*\.\d+)/; + my ($cvsver) = q$Revision: 4.120 $ =~ /(\d+[\d\.]*\.\d+)/; $AGENT = sprintf('%s/%s [%s] %s', $PROGRAM, $VERSION, $cvsver, (W3C::UserAgent::USE_ROBOT_UA @@ -1274,9 +1274,13 @@ &hprintf("%s %s ", $method, $uri) if $verbose_progress; my $request = new HTTP::Request($method, $uri); + $request->header('Accept-Language' => $Opts{Accept_Language}) if $Opts{Accept_Language}; $request->header('Accept', $Accept); + # accept_decodable() was added in LWP 5.814 + $request->accept_decodable() if $request->can('accept_decodable'); + # Are we providing authentication info? if ($auth && $request->url()->host() =~ $Opts{Trusted}) { if (defined($ENV{HTTP_AUTHORIZATION})) {
Received on Thursday, 5 August 2010 15:14:32 UTC