1
0
mirror of https://github.com/apache/httpd.git synced 2025-06-01 23:21:45 +03:00
Roy T. Fielding 4a6123f47b Add charset to the painfully old example scripts.
These should really be replaced with proper encoding
of the output.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111580 13f79535-47bb-0310-9956-ffa450edef68
2004-12-11 05:52:29 +00:00

14 lines
294 B
Perl

#!/usr/local/bin/perl
##
## printenv -- demo CGI program which just prints its environment
##
print "Content-type: text/plain; charset=iso-8859-1\n\n";
foreach $var (sort(keys(%ENV))) {
$val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";
}