eris/tests/default/cgi/set.cgi

24 lines
639 B
Plaintext
Raw Normal View History

2012-02-16 12:05:02 -07:00
#! /bin/sh
echo Content-Type: text/plain
echo
2012-02-16 12:48:06 -07:00
for k in GATEWAY_INTERFACE \
SERVER_PROTOCOL SERVER_SOFTWARE SERVER_NAME SERVER_PORT \
REQUEST_METHOD REQUEST_URI \
SCRIPT_NAME \
REMOTE_ADDR REMOTE_PORT REMOTE_IDENT \
HTTP_USER_AGENT HTTP_COOKIE HTTP_REFERER HTTP_ACCEPT_ENCODING \
AUTH_TYPE \
CONTENT_TYPE CONTENT_LENGTH \
QUERY_STRING \
PATH_INFO PATH_TRANSLATED; do
v=$(eval echo \${$k})
if [ -n "$v" ]; then
echo "$k:$v"
fi
done
2012-02-16 12:05:02 -07:00
if [ -n "$CONTENT_TYPE" ]; then
echo -n "Form data: "
dd bs=1 count=$CONTENT_LENGTH 2>/dev/null
fi