summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlink <link@localhost>2001-06-23 01:24:24 +0000
committerlink <link@localhost>2001-06-23 01:24:24 +0000
commite70913f2de6ac5b4369d3b901f6c961b2a5d1c3a (patch)
tree9b9d5b0ec91a2ff0a89213ce86d6c1f4b7ae6670
parenteb910a04e8c8eb62190d76ffe53fd8b942d97490 (diff)
downloadmarkup-validator-e70913f2de6ac5b4369d3b901f6c961b2a5d1c3a.zip
markup-validator-e70913f2de6ac5b4369d3b901f6c961b2a5d1c3a.tar.gz
markup-validator-e70913f2de6ac5b4369d3b901f6c961b2a5d1c3a.tar.bz2
Killing another global by moving $header into $File->{Results}.
-rwxr-xr-xhttpd/cgi-bin/check16
1 files changed, 8 insertions, 8 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index d9c4269..adc0ce3 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.125 2001-06-23 01:16:42 link Exp $
+# $Id: check,v 1.126 2001-06-23 01:24:24 link Exp $
#
# We need Perl 5.004.
@@ -77,9 +77,9 @@ my $element_ref = 'http://www.htmlhelp.com/reference/html40/';
#
# Strings
-$VERSION = q$Revision: 1.125 $;
+$VERSION = q$Revision: 1.126 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
-$DATE = q$Date: 2001-06-23 01:16:42 $;
+$DATE = q$Date: 2001-06-23 01:24:24 $;
$MAINTAINER = 'gerald@w3.org';
$NOTICE = ''; # "<p><strong>Note: This service will be ...</strong>";
@@ -176,7 +176,7 @@ $q->param('uri', 'http://' . $q->param('uri')) if $q->param('uri') =~ m(^www)i;
# A string containing the HTML header for validation results.
# We save it in a string instead of printing it in case we need to abort before
# we have any meaningfull results to report. @@ May not be necessary!
-my $header = <<"EOF";
+$File->{Results} = <<"EOF";
Content-Type: text/html; charset=utf-8
$html40t_doctype
@@ -200,7 +200,7 @@ EOF
# Punt if we don't recognize this URI scheme.
# @@ LWP does a whole bunch more: transparently!
unless ($q->param('uri') =~ m(^(http|upload)://)) {
- print $header;
+ print $File->{Results};
print <<"EOF";
<p>
Sorry, this type of <a href="http://www.w3.org/Addressing/#terms">URI</a>
@@ -231,7 +231,7 @@ elsif ($q->param('uri')) {$File = &handle_uri($q)};
# Abort if there was no document type mapping for this Content-Type, in which
# case the document type will be equal to the content type (contains a "/").
if ($File->{'Type'} =~ m(/) and not $q->param('uploaded_file')) {
- print $header;
+ print $File->{Results};
print <<"EOF";
<p class="error">
Sorry, I am unable to validate this document because its returned
@@ -323,7 +323,7 @@ if ($File->{Charset} ne 'unknown' and $File->{Charset} ne 'us-ascii') {
#
# Print header and jump links.
-print $header, qq(\n <h2>Document Checked</h2>\n), &build_jump_links;
+print $File->{Results}, qq(\n <h2>Document Checked</h2>\n), &build_jump_links;
#
# Print the list of meta data.
@@ -855,7 +855,7 @@ sub handle_uri {
if ($res->code == 401) {
&authenticate($res->request->url, $res->www_authenticate);
} else {
- print $header;
+ print $File->{Results};
&print_unknown_http_error_message($uri, $res->code, $res->message);
}
&clean_up_and_exit;