--- check.old Tue Apr 17 06:44:05 2001 +++ check Tue Apr 17 21:59:36 2001 @@ -18,6 +18,7 @@ # Load modules use strict; use LWP::UserAgent; +use URI; use URI::Escape; use CGI::Carp; use CGI qw(:cgi -newstyle_urls -private_tempfiles); @@ -127,7 +128,8 @@ # # Futz the URI so "/referer" works. -if ($q->path_info eq '/referer') { +if ($q->path_info =~ m|^/referer(.*)|) { + $q->parse_params($1) if length $1; $q->param('uri', $q->referer); } @@ -151,7 +153,6 @@ # # Munge the URI to include commonly omitted prefixes/suffixes. -$q->param('uri', $q->param('uri') . '/') unless $q->param('uri') =~ m(/); $q->param('uri', 'http://' . $q->param('uri')) if $q->param('uri') =~ m(^www)i; @@ -325,7 +326,7 @@ # # Print different things if we got redirected or had a file upload. -if ($File->{URI} eq $q->param('uri')) { +if (URI::eq($File->{URI}, $q->param('uri'))) { print ' ' x 4, qq(
  • URI: ); print '', ent($File->{URI}), qq(\n); } elsif ($q->param('uploaded_file')) { @@ -1084,10 +1085,11 @@ print "Status: 301 Moved Permanently\n"; print "Content-Type: text/html\n"; - print "Location: http://validator.w3.org/\n\n"; + print "Location: $abs_svc_uri\n\n"; + print ''; print "Moved!\n"; print "

    \n"; - print " Please see the validation service's home page.\n"; + print " Please see the validation service's home page.\n"; print "

    \n"; &clean_up_and_exit;