diff options
author | KatolaZ <katolaz@freaknet.org> | 2018-07-30 07:36:26 +0100 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2018-07-30 07:36:26 +0100 |
commit | abbd53c57a0fa52d315098c819f6ea3d7da8be4a (patch) | |
tree | c0677c3ba4433f2fdbbcfb048f5f26039305c5b2 | |
parent | a044c162ef79b691e53ea662eee5e749e53ca740 (diff) |
return the exit value of cgi0.4
-rwxr-xr-x | gosher | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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}" ;; /?*|"") |