Re: cannot check secure links with W3C checklink

I found I could get the equivalent functionality of the ssl_opts call
by setting:

export PERL_LWP_SSL_VERIFY_HOSTNAME=0

But now I still get broken links reported (with a code of 200 OK!):

List of broken links and other issues:
<secure link>
Line: 10
Code: 200 OK
To do: The link is not public and the actual resource is only available
behind authentication. If not already done, you could specify it.

This is better as I can post process this to get a success status, but
still seems broken to me. Any way I can get better results from this
tool?



On Mon, Jul 23, 2012 at 10:40 AM, Natalie Kershaw <nkershaw@gmail.com> wrote:
>
> I am trying to use the W3C checklink to verify my site, running on the command line. Some links on the site are secure, authenticated with a username and password, to which I have access. I read on the check link documentation page, that I needed to install LWP::Protocol::https which I did.
>
> I am supplying linkcheck with the -u -p -d options, but I get a 500 Internal Server Error for my secure links. The message is "You need".
>
> I tried to simulate what checklink was doing in a standalone perl script:
>
> require LWP::UserAgent; my $server = '<server>';
> my $url = '<url>';
> my $username = '<user>';
> my $password = '<password>';
> my $ua = LWP::UserAgent->new;
> # $ua->ssl_opts(verify_hostname => 0); ### Uncomment this line and it works
>
> my $request = HTTP::Request->new('HEAD', $url);
> $request->authorization_basic($username, $password);
>
> my $response = $ua->request($request); print $response->status_line;
>
> When I uncomment the ssl_opts call, this works. When I comment it, I get the 500 error.
>
> I am running on Mac OS X 10.5.8, W3C::LinkChecker is up to date (4.81), LWP::Protocol::https is up to date (6.03)
>
> Should W3C checklink work for secure links when running on the command line?
>
> Is there some other checklink configuration I need to perform?

Received on Wednesday, 25 July 2012 09:51:07 UTC