summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgosher8
1 files changed, 4 insertions, 4 deletions
diff --git a/gosher b/gosher
index feda798..e896ae6 100755
--- a/gosher
+++ b/gosher
@@ -211,7 +211,7 @@ serve_cgi(){
PATH_TRANSLATED="${script_name}"
[ -n "${QUERY_STRING}" ] && QUERY_STRING="${query_string}"
REMOTE_ADDR=
- REMOTE_HOST="${REMOTE_ADDR}"
+ REMOTE_HOST=
REQUEST_METHOD="GET"
SCRIPT_NAME="${script_name}"
SERVER_NAME="${HOSTNAME}"
@@ -223,7 +223,7 @@ serve_cgi(){
export REMOTE_ADDR REMOTE_HOST REQUEST_METHOD SCRIPT_NAME
export SERVER_NAME SERVER_PORT SERVER_PROTOCOL SERVER_SOFTWARE
${GOPHERDIR}${script_name} "" "${query_string}" "${HOSTNAME}" "${PORT}" 2>&1
- exit 0
+ exit $?
}
@@ -263,11 +263,11 @@ case $selector in
echo "iRP2: ${RP2}"
}
- if [ "${RP1}" = "${RP2}" ]; then
+ [ "${RP1}" = "${RP2}" ] && {
[ -x "${RP1}" ] && {
serve_cgi "${script_name}" "${query_string}"
}
- fi
+ }
invalid_selector "${selector}"
;;
/?*|"")