- From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 01 May 2008 08:03:03 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/perl/modules/W3C/LinkChecker/bin
In directory hutz:/tmp/cvs-serv20441/bin
Modified Files:
checklink
Log Message:
Trivial code cleanups.
Index: checklink
===================================================================
RCS file: /sources/public/perl/modules/W3C/LinkChecker/bin/checklink,v
retrieving revision 4.103
retrieving revision 4.104
diff -u -d -r4.103 -r4.104
--- checklink 1 May 2008 07:56:13 -0000 4.103
+++ checklink 1 May 2008 08:03:01 -0000 4.104
@@ -1203,7 +1203,7 @@
# Are we providing authentication info?
if ($auth && $request->url()->host() =~ $Opts{Trusted}) {
if (defined($ENV{HTTP_AUTHORIZATION})) {
- $request->headers->header(Authorization => $ENV{HTTP_AUTHORIZATION});
+ $request->header(Authorization => $ENV{HTTP_AUTHORIZATION});
} elsif (defined($Opts{User}) && defined($Opts{Password})) {
$request->authorization_basic($Opts{User}, $Opts{Password});
}
@@ -1241,7 +1241,7 @@
# Deal with authentication and avoid loops
if (!defined($realm) &&
- $response->headers->www_authenticate =~ /Basic realm=\"([^\"]+)\"/) {
+ $response->www_authenticate() =~ /Basic realm=\"([^\"]+)\"/) {
$realm = $1;
}
@@ -1672,15 +1672,15 @@
sub authentication ($)
{
- my $r = $_[0];
+ my ($response) = @_;
my $realm = '';
- if ($r->headers->www_authenticate =~ /Basic realm=\"([^\"]+)\"/) {
+ if ($response->www_authenticate() =~ /Basic realm=\"([^\"]+)\"/) {
$realm = $1;
}
if ($Opts{Command_Line}) {
- printf STDERR <<EOF, $r->request()->url(), $realm;
+ printf STDERR <<EOF, $response->request()->url(), $realm;
Authentication is required for %s.
The realm is "%s".
@@ -1689,7 +1689,7 @@
EOF
} else {
- printf("Status: 401 Authorization Required\nWWW-Authenticate: %s\nConnection: close\nContent-Language: en\nContent-Type: text/html; charset=utf-8\n\n", $r->headers->www_authenticate);
+ printf("Status: 401 Authorization Required\nWWW-Authenticate: %s\nConnection: close\nContent-Language: en\nContent-Type: text/html; charset=utf-8\n\n", $response->www_authenticate());
printf("%s
<html lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">
@@ -1700,7 +1700,7 @@
&banner(': 401 Authorization Required');
printf("<p>
You need \"%s\" access to <a href=\"%s\">%s</a> to perform link checking.<br />
-", &encode($realm), (&encode($r->request()->url())) x 2);
+", &encode($realm), (&encode($response->request()->url())) x 2);
if ($Opts{Trusted}) {
printf <<EOF, &encode($Opts{Trusted});
Received on Thursday, 1 May 2008 08:03:35 UTC