summaryrefslogtreecommitdiff
path: root/APACHE_1_3_42/cgi-bin/printenv
diff options
context:
space:
mode:
Diffstat (limited to 'APACHE_1_3_42/cgi-bin/printenv')
-rw-r--r--APACHE_1_3_42/cgi-bin/printenv13
1 files changed, 13 insertions, 0 deletions
diff --git a/APACHE_1_3_42/cgi-bin/printenv b/APACHE_1_3_42/cgi-bin/printenv
new file mode 100644
index 0000000000..207074361a
--- /dev/null
+++ b/APACHE_1_3_42/cgi-bin/printenv
@@ -0,0 +1,13 @@
+#!/usr/local/bin/perl
+##
+## printenv -- demo CGI program which just prints its environment
+##
+
+print "Content-type: text/plain\n\n";
+foreach $var (sort(keys(%ENV))) {
+ $val = $ENV{$var};
+ $val =~ s|\n|\\n|g;
+ $val =~ s|"|\\"|g;
+ print "${var}=\"${val}\"\n";
+}
+