From: Michael Austin [miaustin@bellsouth.net]
Sent: Sunday, June 17, 2001 7:06 PM
To: Info-VAX@Mvb.Saic.Com
Subject: Re: POSTs via SSL to Apache
If you have installed PERL and MOD_PERL, in your PERL executable
directory place this file called printenv.pl
===============< cut here >=================
use CGI qw(:standard escapeHTML);
use VMS::DCLsym;
tie %syms, VMS::DCLsym;
sub cgiparse {
if ($ENV{'REQUEST_METHOD'} eq "POST") {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
} else {
$buffer = $ENV{'QUERY_STRING'};
}
local(@query_strings) = split("&", $buffer);
foreach $q (@query_strings) {
$q =~ s/\+/ /g;
($attr, $val) = split("=", $q);
$val =~ s/%/\n%/g;
print "$attr = $val
";
local($tmpval);
foreach (split("\n",$val)){
if(m:%(\w\w):){
local($binval) = hex($1);
if(($binval>0)&&($binval<256)){
local($htmlval) = pack("C",$binval);
s/%$1/$htmlval/;
}
}
$tmpval .= $_;
}
$parseit{$attr} = $tmpval;
}
%parseit;
}
print "Content-type: text/html\n\n";
&cgiparse();
while (($key, $val) = each %ENV) {
print "$key = $val
\n";
}
===================================
This will produce all of the environment variables that your perl/cgi
will see. My MOD_PERL points to a directory
Alias /bin/ "/apache$root/htdocs/perl/"
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
Allow from all
PerlSendHeader On
your post would look like: