summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlink <link@localhost>2005-02-06 01:00:57 +0000
committerlink <link@localhost>2005-02-06 01:00:57 +0000
commite608e152a9bd0a208d6e38045c97531c91bb1797 (patch)
treed608d02e7751b5a0446619c7287fce83fd55e3ed
parentc580f60e20a8e63d3858e02c045e4d3d6b7593bb (diff)
downloadmarkup-validator-e608e152a9bd0a208d6e38045c97531c91bb1797.zip
markup-validator-e608e152a9bd0a208d6e38045c97531c91bb1797.tar.gz
markup-validator-e608e152a9bd0a208d6e38045c97531c91bb1797.tar.bz2
Nuke non-functional SOAP code (resurrect post-M12N).
-rwxr-xr-xhttpd/cgi-bin/check168
1 files changed, 49 insertions, 119 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index 89f66fa..5d4948c 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -9,7 +9,7 @@
# This source code is available under the license at:
# http://www.w3.org/Consortium/Legal/copyright-software
#
-# $Id: check,v 1.393 2005-02-06 00:56:47 link Exp $
+# $Id: check,v 1.394 2005-02-06 01:00:57 link Exp $
#
# Disable buffering on STDOUT!
@@ -99,7 +99,6 @@ use constant MODE_WF => 8; # 0000 1000, only XML well-formed checking.
#
# Define global variables.
use vars qw($DEBUG $CFG $RSRC $VERSION $HAVE_IPC_RUN);
-our $HAVE_SOAP_LITE;
#
@@ -215,20 +214,6 @@ Directory not readable (permission denied): @_r
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) {
@@ -239,7 +224,7 @@ Directory not readable (permission denied): @_r
#
# Strings
- $VERSION = q$Revision: 1.393 $;
+ $VERSION = q$Revision: 1.394 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -264,10 +249,7 @@ delete $ENV{PATH};
#
# 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 @@ my $File;
#
# 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 @@ undef $lang;
#
# 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...
+$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') : '';
+
+#
+# "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 {
- $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') : '';
-
- #
- # "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.
- }
+ $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 @@ sub self_url_file {
}
-
-
-
-################################################################################
-# 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