- From: Terje Bless <link@dev.w3.org>
- Date: Sun, 06 Feb 2005 01:01:00 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv32563/httpd/cgi-bin
Modified Files:
check
Log Message:
Nuke non-functional SOAP code (resurrect post-M12N).
Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.393
retrieving revision 1.394
diff -u -d -r1.393 -r1.394
--- check 6 Feb 2005 00:56:47 -0000 1.393
+++ check 6 Feb 2005 01:00:57 -0000 1.394
@@ -99,7 +99,6 @@
#
# Define global variables.
use vars qw($DEBUG $CFG $RSRC $VERSION $HAVE_IPC_RUN);
-our $HAVE_SOAP_LITE;
#
@@ -215,20 +214,6 @@
IPC::Open3->import('open3');
}
- #FIXME: This is just a framework and highly experimental!
- #
- # Load SOAP::Lite if available and allowed by config.
- $HAVE_SOAP_LITE = FALSE;
- if (exists $ENV{'HTTP_SOAPACTION'} and $CFG->{'Enable SOAP'} == TRUE) {
- eval {
- local $SIG{__DIE__};
- require SOAP::Transport::HTTP;
- };
- $HAVE_SOAP_LITE = !$@;
- }
- #FIXME;
-
-
#
# Set debug flag.
if ($CFG->{'Allow Debug'} == TRUE) {
@@ -264,10 +249,7 @@
#
# Create a new CGI object.
-my $q;
-unless ($HAVE_SOAP_LITE) {
- $q = new CGI;
-}
+my $q = new CGI;
#
# The data structure that will hold all session data.
@@ -280,9 +262,7 @@
#
# The URL to this CGI Script.
-unless ($HAVE_SOAP_LITE) {
- $File->{Env}->{'Self URI'} = $q->url(-query => 0);
-}
+$File->{Env}->{'Self URI'} = $q->url(-query => 0);
#################################
@@ -349,59 +329,54 @@
#
# Preprocess the CGI parameters.
-if ($HAVE_SOAP_LITE) {
- SOAP::Transport::HTTP::CGI->dispatch_to('MySOAP')->handle;
- exit; # SOAP calls do all the processing in the sub...
-} else {
- $q = &prepCGI($File, $q);
+$q = &prepCGI($File, $q);
- #
- # Set session switches.
- $File->{Opt}->{'Outline'} = $q->param('outline') ? TRUE : FALSE;
- $File->{Opt}->{'Show Source'} = $q->param('ss') ? TRUE : FALSE;
- $File->{Opt}->{'Show Parsetree'} = $q->param('sp') ? TRUE : FALSE;
- $File->{Opt}->{'No Attributes'} = $q->param('noatt') ? TRUE : FALSE;
- $File->{Opt}->{'Show ESIS'} = $q->param('esis') ? TRUE : FALSE;
- $File->{Opt}->{'Show Errors'} = $q->param('errors') ? TRUE : FALSE;
- $File->{Opt}->{'Verbose'} = $q->param('verbose') ? TRUE : FALSE;
- $File->{Opt}->{'Debug'} = $q->param('debug') ? TRUE : FALSE;
- $File->{Opt}->{'No200'} = $q->param('No200') ? TRUE : FALSE;
- # $File->{Opt}->{'Fussy'} = $q->param('fussy') ? TRUE : FALSE;
- $File->{Opt}->{'Charset'} = $q->param('charset') ? lc $q->param('charset'): '';
- $File->{Opt}->{'DOCTYPE'} = $q->param('doctype') ? $q->param('doctype') : '';
- $File->{Opt}->{'Output'} = $q->param('output') ? $q->param('output') : 'html';
- $File->{Opt}->{'Max Errors'} = $q->param('me') ? $q->param('me') : '';
+#
+# Set session switches.
+$File->{Opt}->{'Outline'} = $q->param('outline') ? TRUE : FALSE;
+$File->{Opt}->{'Show Source'} = $q->param('ss') ? TRUE : FALSE;
+$File->{Opt}->{'Show Parsetree'} = $q->param('sp') ? TRUE : FALSE;
+$File->{Opt}->{'No Attributes'} = $q->param('noatt') ? TRUE : FALSE;
+$File->{Opt}->{'Show ESIS'} = $q->param('esis') ? TRUE : FALSE;
+$File->{Opt}->{'Show Errors'} = $q->param('errors') ? TRUE : FALSE;
+$File->{Opt}->{'Verbose'} = $q->param('verbose') ? TRUE : FALSE;
+$File->{Opt}->{'Debug'} = $q->param('debug') ? TRUE : FALSE;
+$File->{Opt}->{'No200'} = $q->param('No200') ? TRUE : FALSE;
+# $File->{Opt}->{'Fussy'} = $q->param('fussy') ? TRUE : FALSE;
+$File->{Opt}->{'Charset'} = $q->param('charset') ? lc $q->param('charset'): '';
+$File->{Opt}->{'DOCTYPE'} = $q->param('doctype') ? $q->param('doctype') : '';
+$File->{Opt}->{'Output'} = $q->param('output') ? $q->param('output') : 'html';
+$File->{Opt}->{'Max Errors'} = $q->param('me') ? $q->param('me') : '';
- #
- # "Fallback" info for Character Encoding (fbc), Content-Type (fbt),
- # and DOCTYPE (fbd). If TRUE, the Override values are treated as
- # Fallbacks instead of Overrides.
- $File->{Opt}->{FB}->{Charset} = $q->param('fbc') ? TRUE : FALSE;
- $File->{Opt}->{FB}->{Type} = $q->param('fbt') ? TRUE : FALSE;
- $File->{Opt}->{FB}->{DOCTYPE} = $q->param('fbd') ? TRUE : FALSE;
+#
+# "Fallback" info for Character Encoding (fbc), Content-Type (fbt),
+# and DOCTYPE (fbd). If TRUE, the Override values are treated as
+# Fallbacks instead of Overrides.
+$File->{Opt}->{FB}->{Charset} = $q->param('fbc') ? TRUE : FALSE;
+$File->{Opt}->{FB}->{Type} = $q->param('fbt') ? TRUE : FALSE;
+$File->{Opt}->{FB}->{DOCTYPE} = $q->param('fbd') ? TRUE : FALSE;
- #
- # If ";debug" was given, let it overrule the value from the config file,
- # regardless of whether it's "0" or "1" (on or off), but only if config
- # allows the debugging options.
- if ($CFG->{'Allow Debug'}) {
- $DEBUG = $q->param('debug') if defined $q->param('debug');
- $File->{Opt}->{Verbose} = TRUE if $DEBUG;
- } else {
- $DEBUG = FALSE; # The default.
- }
+#
+# If ";debug" was given, let it overrule the value from the config file,
+# regardless of whether it's "0" or "1" (on or off), but only if config
+# allows the debugging options.
+if ($CFG->{'Allow Debug'}) {
+ $DEBUG = $q->param('debug') if defined $q->param('debug');
+ $File->{Opt}->{Verbose} = TRUE if $DEBUG;
+} else {
+ $DEBUG = FALSE; # The default.
+}
- &abort_if_error_flagged($File, O_NONE); # Too early to &print_table.
+&abort_if_error_flagged($File, O_NONE); # Too early to &print_table.
- #
- # Get the file and metadata.
- if ($q->param('uploaded_file')) {
- $File = &handle_file($q, $File);
- } elsif ($q->param('fragment')) {
- $File = &handle_frag($q, $File);
- } elsif ($q->param('uri')) {
- $File = &handle_uri($q, $File);
- }
+#
+# Get the file and metadata.
+if ($q->param('uploaded_file')) {
+ $File = &handle_file($q, $File);
+} elsif ($q->param('fragment')) {
+ $File = &handle_frag($q, $File);
+} elsif ($q->param('uri')) {
+ $File = &handle_uri($q, $File);
}
#
@@ -3007,51 +2982,6 @@
}
-
-
-
-################################################################################
-# Abandon all hope ye who enter here... ########################################
-################################################################################
-
-#
-# This is where the SOAP magic happens.
-package MySOAP;
-
-sub check {
- my $class = shift || '';
- my $uri = shift || '';
- my $File = &main::handle_uri($uri, {});
- $File = &main::find_xml_encoding($File);
- if ($File->{Charset}->{HTTP}) { warn "HTTP";
- $File->{Charset}->{Use} = $File->{Charset}->{HTTP};
- } elsif ($File->{ContentType} =~ m(^text/([-.a-zA-Z0-9]\+)?xml$)) { warn "CT";
- $File->{Charset}->{Use} = 'us-ascii';
- } elsif ($File->{Charset}->{XML}) { warn "XML";
- $File->{Charset}->{Use} = $File->{Charset}->{XML};
- } elsif ($File->{Charset}->{Auto} =~ /^utf-16[bl]e$/ && $File->{BOM} == 2) { warn "autoBOM";
- $File->{Charset}->{Use} = 'utf-16';
- } elsif ($File->{ContentType} =~ m(^application/([-.a-zA-Z0-9]+\+)?xml$)) { warn "app+xml";
- $File->{Charset}->{Use} = "utf-8";
- } elsif (&main::is_xml($File) and not $File->{ContentType} =~ m(^text/)) { warn "text";
- $File->{Charset}->{Use} = 'utf-8';
- }
- $File->{Content} = &main::normalize_newlines($File->{Bytes},
- &main::exact_charset($File, $File->{Charset}->{Use}));
- $File = &main::preparse($File);
- unless ($File->{Charset}->{Use}) {
- $File->{Charset}->{Use} = $File->{Charset}->{META};
- }
-
- $File = &main::parse($File);
- if ($File->{'Is Valid'}) {
- return $File->{ESIS};
- } else {
- return $File->{Errors};
-# return join '', map {"$_->{line}:$_->{char}:$_->{msg}\n"} @{$File->{Errors}};
- }
-}
-
# Local Variables:
# mode: perl
# indent-tabs-mode: nil
Received on Sunday, 6 February 2005 01:01:00 UTC