W3C home > Mailing lists > Public > www-validator-cvs@w3.org > November 2006

validator/httpd/cgi-bin check,1.466,1.467

From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 13 Nov 2006 04:26:32 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1GjTOy-00035a-0h@lionel-hutz.w3.org>

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

Modified Files:
	check 
Log Message:
* workaround for bug 798 does not need s:p:o 0.100 any more, we can put req back to .99
* port from 0.7.4 to HEAD - bringing back outline option (still need filter) and commenting out parse tree etc.



Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.466
retrieving revision 1.467
diff -u -d -r1.466 -r1.467
--- check	8 Nov 2006 01:18:49 -0000	1.466
+++ check	13 Nov 2006 04:26:29 -0000	1.467
@@ -55,7 +55,7 @@
 use Encode                    qw();
 use Encode::Alias             qw();
 use HTML::Encoding       0.52 qw();
-use SGML::Parser::OpenSP      qw();
+use SGML::Parser::OpenSP 0.99 qw();
 
 ###############################################################################
 #### Constant definitions. ####################################################
@@ -322,6 +322,13 @@
   loop_context_vars => TRUE,
   cache             => TRUE,
 );
+my $SOAPDIS = HTML::Template->new(
+  filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
+                                          $lang, 'soap_disabled.tmpl'),
+  die_on_bad_params => FALSE,
+  loop_context_vars => TRUE,
+  cache             => TRUE,
+);
 my $EARLT = HTML::Template->new(
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates},
                                           $lang, 'earl_xml.tmpl'),
@@ -689,7 +696,12 @@
 } elsif ($File->{Opt}->{Output} eq 'ucn') {
   $template = $UCNT;
 } elsif ($File->{Opt}->{Output} eq 'soap12') {
-  if ($File->{'Error Flagged'}) {
+  if ($CFG->{'Enable SOAP'} != 1) { # API disabled - ideally this should have been sent before performing validation...
+    print CGI::header(-status => 503, -content_language => "en",
+    -type => "text/html", -charset => "utf-8"
+    );
+    $template = $SOAPDIS;
+  } elsif ($File->{'Error Flagged'}) { # should send SOAP fault message
     $template = $SOAPFT;
   } else {
     $template = $SOAPT;
@@ -704,12 +716,13 @@
 $template->param(file_warnings => $File->{Warnings});
 $template->param(file_source => &source($File))
   if $template->param('opt_show_source');
-$template->param('opt_show_esis' => TRUE)
-  if $File->{Opt}->{'Show ESIS'};
-$template->param('opt_show_raw_errors' => TRUE)
-  if $File->{Opt}->{'Show Errors'};
-$template->param('file_raw_errors' => &show_errors($File))
-  if $template->param('opt_show_raw_errors');
+#$template->param('opt_show_esis' => TRUE)
+#  if $File->{Opt}->{'Show ESIS'};
+#$template->param('opt_show_raw_errors' => TRUE)
+#  if $File->{Opt}->{'Show Errors'};
+#$template->param('file_raw_errors' => &show_errors($File))
+#  if $template->param('opt_show_raw_errors');
+  $T->param(file_outline   => &outline($File)) if $T->param('opt_show_outline');
 
 print $template->output;
 
Received on Monday, 13 November 2006 04:26:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:54:55 GMT