#!/bin/sh

cat << EOF
Content-type: text/html

<HTML><HEAD><TITLE>mod_backhand test CGI script</TITLE></HEAD>
<BODY BGCOLOR=#ffffff TEXT=#000000>
<CENTER>
EOF

echo "<H2>You are visiting $HTTP_HOST</H2>"
echo "<HR>"
if [ -n "$HTTP_BACKHANDPROXIED" ]; then
echo "The host you have contacted is $HTTP_BACKHANDPROXIED.<BR>"
echo "This host has found that "`hostname`" was better suited to answer your request<BR>"
else
echo "The host you have contacted is "`hostname`".<BR>"
echo "This host believes that it is best suited to handle this request.<BR>"
fi

echo "In the end, "`hostname`" satisfied your request.<BR>"
echo "<HR>"

cat << EOF
<BR>
<TABLE WIDTH=90% CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR><TD align=right>
All of this is made possible by <A HREF="http://www.backhand.org/">Backhand</A>.<BR>
<A HREF="http://www.backhand.org/mod_backhand/"><IMG SRC="/icons/mod_backhand_mini.jpg" HEIGHT=45 WIDTH=199 BORDER=0></A>
</TD></TR></TABLE>
</CENTER>
</BODY>
</HTML>
EOF
