#!/opt/internet/bin/perl
#
# test-cgi.pl -- WAIS search interface
#
# test-cgi.pl,v 0.1 1994/06/30 Mary Morris
#
# Example of test-cgi converted to perl
#

print "Content-type: text/plain\n\n";
print "CGI/1.0 test script report<P>";

if ($ENV{'REQUEST_METHOD'} eq "POST") {
	$form = <STDIN>;
	print "$form \n";
} else { 
print "argc is $#ARGV <P>argv is ";

while (@ARGV) {
	$ARGV=shift;
	print "$ARGV ";
}
}
print "<P>";
#print argc is $#. argv is "$*".
#
print "SERVER_SOFTWARE = $ENV{'SERVER_SOFTWARE'}<P>";
print "SERVER_NAME = $ENV{'SERVER_NAME'}<P>";
print "GATEWAY_INTERFACE = $ENV{'GATEWAY_INTERFACE'}<P>";
print "SERVER_PROTOCOL = $ENV{'SERVER_PROTOCOL'}<P>";
print "SERVER_PORT = $ENV{'SERVER_PORT'}<P>";
print "SERVER_ROOT = $ENV{'SERVER_ROOT'}<P>";
print "REQUEST_METHOD = $ENV{'REQUEST_METHOD'}<P>";
print "HTTP_ACCEPT = $ENV{'HTTP_ACCEPT'}<P>";
print "PATH_INFO = $ENV{'PATH_INFO'}<P>";
print "PATH = $ENV{'PATH'}<P>";
print "PATH_TRANSLATED = $ENV{'PATH_TRANSLATED'}<P>";
print "SCRIPT_NAME = $ENV{'SCRIPT_NAME'}<P>";
print "QUERY_STRING = $ENV{'QUERY_STRING'}<P>";
print "QUERY_STRING_UNESCAPED = $ENV{'QUERY_STRING_UNESCAPED'}<P>";
print "REMOTE_HOST = $ENV{'REMOTE_HOST'}<P>";
print "REMOTE_IDENT = $ENV{'REMOTE_IDENT'}<P>";
print "REMOTE_ADDR = $ENV{'REMOTE_ADDR'}<P>";
print "REMOTE_USER = $ENV{'REMOTE_USER'}<P>";
print "AUTH_TYPE = $ENV{'AUTH_TYPE'}<P>";
print "CONTENT_TYPE = $ENV{'CONTENT_TYPE'}<P>";
print "CONTENT_LENGTH = $ENV{'CONTENT_LENGTH'}<P>";
print "DOCUMENT_ROOT = $ENV{'DOCUMENT_ROOT'}<P>";
print "DOCUMENT_URI = $ENV{'DOCUMENT_URI'}<P>";
print "DOCUMENT_NAME = $ENV{'DOCUMENT_NAME'}<P>";
print "DATE_LOCAL = $ENV{'DATE_LOCAL'}<P>";
print "DATE_GMT = $ENV{'DATE_GMT'}<P>";
print "LAST_MODIFIED = $ENV{'LAST_MODIFIED'}<P>";
