- From: Ville Skytta <ville@dev.w3.org>
- Date: Sat, 05 Feb 2005 18:48:23 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/perl/modules/W3C/LinkChecker/bin In directory hutz:/tmp/cvs-serv10275/bin Modified Files: checklink Log Message: Check redirects for private IP addresses too. Index: checklink =================================================================== RCS file: /sources/public/perl/modules/W3C/LinkChecker/bin/checklink,v retrieving revision 4.15 retrieving revision 4.16 diff -u -d -r4.15 -r4.16 --- checklink 9 Jan 2005 20:43:36 -0000 4.15 +++ checklink 5 Feb 2005 18:48:20 -0000 4.16 @@ -78,7 +78,15 @@ # robust way of determining whether something is a LWP "internal" request. &W3C::LinkChecker::hprintf("\n%s %s ", $request->method(),$request->uri()); } - return $self->SUPER::redirect_ok($request, $response); + return 0 unless $self->SUPER::redirect_ok($request, $response); + if (my $res = &W3C::LinkChecker::ip_allowed($request->uri())) { + $response->previous($response->clone()); + $response->request($request); + $response->code($res->code()); + $response->message($res->message()); + return 0; + } + return 1; } # -----------------------------------------------------------------------------
Received on Saturday, 5 February 2005 18:48:23 UTC