return the exit value of cgi

master 0.4
KatolaZ 6 years ago
parent a044c162ef
commit abbd53c57a
  1. 8
      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}"
;;
/?*|"")

Loading…
Cancel
Save