validator/httpd/cgi-bin check,1.406,1.407

Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv23569/httpd/cgi-bin

Modified Files:
	check 
Log Message:
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=1168 for xml, earl, n3 outputs
and adding X-W3C-* headers to non-custom outputs as well



Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.406
retrieving revision 1.407
diff -u -d -r1.406 -r1.407
--- check	1 Mar 2005 20:29:34 -0000	1.406
+++ check	24 Mar 2005 02:41:12 -0000	1.407
@@ -829,9 +829,12 @@
 
   if ($File->{'Is Valid'}) {
     $T->param(VALID => TRUE);
+    $T->param(valid_status => 'Valid');
     &report_valid($File, $T);
   } else {
     $T->param(VALID => FALSE);
+    $T->param(valid_status => 'Invalid');
+    $T->param(valid_errors_num => scalar @{$File->{Errors}});
     $T->param(file_errors => &report_errors($File));
   }
 
@@ -932,7 +935,6 @@
   } elsif (defined $File->{Tentative}) {
     $T->param(is_tentative => TRUE);
   }
-
   my $thispage = $File->{Env}->{'Self URI'};
   my $escaped_uri = uri_escape($File->{URI});
   $thispage .= qq(?uri=$escaped_uri);
@@ -2088,6 +2090,9 @@
 
   my $valid = ($File->{'Is Valid'} ? 'Valid' : 'Invalid');
   my $errs  = ($File->{'Is Valid'} ? '0' : scalar @{$File->{Errors}});
+  if ($File->{E}->param('fatal_http_error')) {
+    $valid = 'Could not validate';
+  } 
 
   print <<".EOF.";
 Content-Type: application/xml; charset=UTF-8
@@ -2186,6 +2191,9 @@
 
   my $valid = ($File->{'Is Valid'} ? 'Valid' : 'Invalid');
   my $errs  = ($File->{'Is Valid'} ? '0' : scalar @{$File->{Errors}});
+  if ($File->{E}->param('fatal_http_error')) {
+    $valid = 'Could not validate';
+  } 
 
   print <<".EOF.";
 Content-Type: application/rdf+xml; charset=UTF-8
@@ -2282,6 +2290,9 @@
 
   my $valid = ($File->{'Is Valid'} ? 'Valid' : 'Invalid');
   my $errs  = ($File->{'Is Valid'} ? '0' : scalar @{$File->{Errors}});
+  if ($File->{E}->param('fatal_http_error')) {
+    $valid = 'Could not validate';
+  } 
 
   print <<".EOF.";
 Content-Type: text/plain; charset=UTF-8

Received on Thursday, 24 March 2005 02:41:15 UTC