printenv revision abbedb998850d9950bc5f5907ca2f6437b0a936e
883N/A#
883N/A
883N/A# To permit this cgi, replace # on the first line above with the
883N/A# appropriate #!/path/to/perl shebang, and set this script executable
883N/A# with chmod 755.
883N/A#
883N/A# Note that it is subject to cross site scripting attacks on MS IE
883N/A# and any other browser which fails to honor RFC2616, so never use
883N/A# it in a live server environment, it is provided only for testing.
883N/A
883N/A##
883N/A## printenv -- demo CGI program which just prints its environment
883N/A##
883N/A
883N/Aprint "Content-type: text/plain; charset=iso-8859-1\n\n";
883N/Aforeach $var (sort(keys(%ENV))) {
883N/A $val = $ENV{$var};
883N/A $val =~ s|\n|\\n|g;
883N/A $val =~ s|"|\\"|g;
883N/A print "${var}=\"${val}\"\n";
883N/A}
883N/A
883N/A