summaryrefslogtreecommitdiffstats
path: root/docs/cgi-examples
diff options
context:
space:
mode:
authorRoy T. Fielding <fielding@apache.org>1999-08-24 07:34:15 +0200
committerRoy T. Fielding <fielding@apache.org>1999-08-24 07:34:15 +0200
commit77c277683225999b00853b02ebde3bc9cf7f7f6f (patch)
tree8563b1cf7b31b256a6a71e7ab18ee121c640e784 /docs/cgi-examples
parentForgot listen.c in the earlier AcceptEx patch to winnt.c. (diff)
downloadapache2-77c277683225999b00853b02ebde3bc9cf7f7f6f.tar.xz
apache2-77c277683225999b00853b02ebde3bc9cf7f7f6f.zip
Apache 1.3.9 baseline for the Apache 2.0 repository.
Obtained from: Apache 1.3.9 (minus unused files), tag APACHE_1_3_9 Submitted by: Apache Group git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83748 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/cgi-examples')
-rw-r--r--docs/cgi-examples/printenv7
-rw-r--r--docs/cgi-examples/test-cgi31
2 files changed, 38 insertions, 0 deletions
diff --git a/docs/cgi-examples/printenv b/docs/cgi-examples/printenv
new file mode 100644
index 0000000000..7d389e0ac5
--- /dev/null
+++ b/docs/cgi-examples/printenv
@@ -0,0 +1,7 @@
+#!/usr/local/bin/perl
+
+print "Content-type: text/html\n\n";
+while (($key, $val) = each %ENV) {
+ print "$key = $val<BR>\n";
+}
+
diff --git a/docs/cgi-examples/test-cgi b/docs/cgi-examples/test-cgi
new file mode 100644
index 0000000000..a85631e3aa
--- /dev/null
+++ b/docs/cgi-examples/test-cgi
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# disable filename globbing
+set -f
+
+echo Content-type: text/plain
+echo
+
+echo CGI/1.0 test script report:
+echo
+
+echo argc is $#. argv is "$*".
+echo
+
+echo SERVER_SOFTWARE = $SERVER_SOFTWARE
+echo SERVER_NAME = $SERVER_NAME
+echo GATEWAY_INTERFACE = $GATEWAY_INTERFACE
+echo SERVER_PROTOCOL = $SERVER_PROTOCOL
+echo SERVER_PORT = $SERVER_PORT
+echo REQUEST_METHOD = $REQUEST_METHOD
+echo HTTP_ACCEPT = "$HTTP_ACCEPT"
+echo PATH_INFO = "$PATH_INFO"
+echo PATH_TRANSLATED = "$PATH_TRANSLATED"
+echo SCRIPT_NAME = "$SCRIPT_NAME"
+echo QUERY_STRING = "$QUERY_STRING"
+echo REMOTE_HOST = $REMOTE_HOST
+echo REMOTE_ADDR = $REMOTE_ADDR
+echo REMOTE_USER = $REMOTE_USER
+echo AUTH_TYPE = $AUTH_TYPE
+echo CONTENT_TYPE = $CONTENT_TYPE
+echo CONTENT_LENGTH = $CONTENT_LENGTH