summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlink <link@localhost>2001-04-18 03:06:37 +0000
committerlink <link@localhost>2001-04-18 03:06:37 +0000
commit17faf26349519f62ea8839f706ff8dd2c4742357 (patch)
tree6f2a07ecc222494b212d31ac40a49e2b37bef799
parent6c117eff84840a1e266fe9152b3f0865138f25c1 (diff)
downloadmarkup-validator-17faf26349519f62ea8839f706ff8dd2c4742357.zip
markup-validator-17faf26349519f62ea8839f706ff8dd2c4742357.tar.gz
markup-validator-17faf26349519f62ea8839f706ff8dd2c4742357.tar.bz2
Applying parts of patch from Bj?rn H?hrmann <bjoern@hoehrmann.de>.
http://lists.w3.org/Archives/Public/www-validator/2001AprJun/0062.html
-rwxr-xr-xhttpd/cgi-bin/check28
1 files changed, 13 insertions, 15 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index 5dbc787..8053f69 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -8,7 +8,7 @@
# This source code is available under the license at:
# http://www.w3.org/Consortium/Legal/copyright-software
#
-# $Id: check,v 1.94 2001-04-17 04:19:43 link Exp $
+# $Id: check,v 1.95 2001-04-18 03:06:37 link Exp $
#
# We need Perl 5.004.
@@ -18,6 +18,7 @@ require 5.004;
# Load modules
use strict;
use LWP::UserAgent;
+use URI;
use URI::Escape;
use CGI::Carp;
use CGI qw(:cgi -newstyle_urls -private_tempfiles);
@@ -74,9 +75,9 @@ my $element_ref = 'http://www.htmlhelp.com/reference/html40/';
#
# Strings
-$VERSION = q$Revision: 1.94 $;
+$VERSION = q$Revision: 1.95 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
-$DATE = q$Date: 2001-04-17 04:19:43 $;
+$DATE = q$Date: 2001-04-18 03:06:37 $;
$MAINTAINER = 'gerald@w3.org';
$NOTICE = ''; # "<p><strong>Note: This service will be ...</strong>";
@@ -150,8 +151,7 @@ if ($q->param('uploaded_file')) {
&redirect_to_home_page unless length($q->param('uri')) > 5;
#
-# Munge the URI to include commonly omitted prefixes/suffixes.
-$q->param('uri', $q->param('uri') . '/') unless $q->param('uri') =~ m(/);
+# Munge the URI to include commonly omitted prefix.
$q->param('uri', 'http://' . $q->param('uri')) if $q->param('uri') =~ m(^www)i;
@@ -1080,17 +1080,15 @@ sub clean_up_and_exit {
}
sub redirect_to_home_page {
+ print <<".EOF.";
+Status: 301 Moved Permanently
+Content-Type: text/html
+Location: $abs_svc_uri
- print "Status: 301 Moved Permanently\n";
- print "Content-Type: text/html\n";
- print "Location: http://validator.w3.org/\n\n";
- print "<title>Moved!</title>\n";
- print "<p>\n";
- print " Please see <a href=\"http://validator.w3.org/\">the validation service's home page.</a>\n";
- print "</p>\n";
-
- &clean_up_and_exit;
-
+<title>Moved!</title>
+<p>Please see <a href="$abs_svc_uri">the home page.</a></p>
+.EOF.
+ &clean_up_and_exit;
}
sub build_jump_links {