- From: Mercurial notifier <nobody@w3.org>
- Date: Thu, 05 Aug 2010 14:47:22 +0000
- To: link-checker updates <www-validator-cvs@w3.org>
changeset: 315:8debf42a967e user: ville date: Sun May 03 09:34:08 2009 +0000 files: bin/checklink description: Treat masquerade targets that lack a scheme as file: URIs, absolutize relative paths. diff -r 051747f1fdff -r 8debf42a967e bin/checklink --- a/bin/checklink Tue Apr 28 20:33:44 2009 +0000 +++ b/bin/checklink Sun May 03 09:34:08 2009 +0000 @@ -5,7 +5,7 @@ # (c) 1999-2009 World Wide Web Consortium # based on Renaud Bruyeron's checklink.pl # -# $Id: checklink,v 4.158 2009-04-19 11:13:23 ville Exp $ +# $Id: checklink,v 4.159 2009-05-03 09:34:08 ville Exp $ # # This program is licensed under the W3C(r) Software License: # http://www.w3.org/Consortium/Legal/copyright-software @@ -275,7 +275,7 @@ $PROGRAM = 'W3C-checklink'; $VERSION = '4.5'; $REVISION = sprintf('version %s (c) 1999-2009 W3C', $VERSION); - my ($cvsver) = q$Revision: 4.158 $ =~ /(\d+[\d\.]*\.\d+)/; + my ($cvsver) = q$Revision: 4.159 $ =~ /(\d+[\d\.]*\.\d+)/; $AGENT = sprintf('%s/%s [%s] %s', $PROGRAM, $VERSION, $cvsver, (W3C::UserAgent::USE_ROBOT_UA @@ -666,8 +666,10 @@ !defined($masq[1]) || $masq[1] !~ /\S/) { usage(1, "Error: --masquerade takes two whitespace separated URIs."); } else { + require URI::file; $Opts{Masquerade_From} = $masq[0]; - $Opts{Masquerade_To} = $masq[1]; + my $masq_to = URI->new($masq[1]); + $Opts{Masquerade_To} = $u->scheme() ? $u : URI::file->new_abs($masq[1]); } }
Received on Thursday, 5 August 2010 15:32:39 UTC