W3C home > Mailing lists > Public > www-validator-cvs@w3.org > August 2010

link-checker commit: Mimic LWP by setting the "Client-Warning: Internal response" to "IP disallowed" internal responses.

From: Mercurial notifier <nobody@w3.org>
Date: Thu, 05 Aug 2010 14:47:13 +0000
To: link-checker updates <www-validator-cvs@w3.org>
Message-Id: <E1Oh1iz-00061j-J0@blinky.w3.org>
changeset:   226:8ee477c4227f
user:        ville
date:        Thu Feb 14 23:56:42 2008 +0000
files:       bin/checklink
description:
Mimic LWP by setting the "Client-Warning: Internal response" to "IP disallowed" internal responses.


diff -r 024cb8a0b31c -r 8ee477c4227f bin/checklink
--- a/bin/checklink	Thu Feb 14 23:45:38 2008 +0000
+++ b/bin/checklink	Thu Feb 14 23:56:42 2008 +0000
@@ -5,7 +5,7 @@
 # (c) 1999-2008 World Wide Web Consortium
 # based on Renaud Bruyeron's checklink.pl
 #
-# $Id: checklink,v 4.96 2008-02-14 23:45:38 ville Exp $
+# $Id: checklink,v 4.97 2008-02-14 23:56:42 ville Exp $
 #
 # This program is licensed under the W3C(r) Software License:
 #       http://www.w3.org/Consortium/Legal/copyright-software
@@ -159,6 +159,7 @@
   if ($iptype && $iptype ne 'PUBLIC') {
     $resp = HTTP::Response->new(403,
     'Checking non-public IP address disallowed by link checker configuration');
+    $resp->header('Client-Warning', 'Internal response');
   }
   return $resp;
 }
@@ -241,7 +242,7 @@
   $PROGRAM     = 'W3C-checklink';
   $VERSION     = '4.3';
   $REVISION    = sprintf('version %s (c) 1999-2008 W3C', $VERSION);
-  my ($cvsver) = q$Revision: 4.96 $ =~ /(\d+[\d\.]*\.\d+)/;
+  my ($cvsver) = q$Revision: 4.97 $ =~ /(\d+[\d\.]*\.\d+)/;
   $AGENT       = sprintf('%s/%s [%s] %s',
                          $PROGRAM, $VERSION, $cvsver, LWP::RobotUA->_agent());
 
Received on Thursday, 5 August 2010 14:47:27 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:44 UTC