summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgosher4
1 files changed, 2 insertions, 2 deletions
diff --git a/gosher b/gosher
index a021cb3..feda798 100755
--- a/gosher
+++ b/gosher
@@ -209,7 +209,7 @@ serve_cgi(){
GATEWAY_INTERFACE="CGI/1.1"
PATH_INFO="${script_name}"
PATH_TRANSLATED="${script_name}"
- QUERY_STRING="${query_string}"
+ [ -n "${QUERY_STRING}" ] && QUERY_STRING="${query_string}"
REMOTE_ADDR=
REMOTE_HOST="${REMOTE_ADDR}"
REQUEST_METHOD="GET"
@@ -222,7 +222,7 @@ serve_cgi(){
export GATEWAY_INTERFACE PATH_INFO PATH_TRANSLATED QUERY_STRING
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}
+ ${GOPHERDIR}${script_name} "" "${query_string}" "${HOSTNAME}" "${PORT}" 2>&1
exit 0
}