summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2018-07-30 06:57:53 +0100
committerKatolaZ <katolaz@freaknet.org>2018-07-30 06:57:53 +0100
commita044c162ef79b691e53ea662eee5e749e53ca740 (patch)
treefb3351ff427ed52b28d83df100e7a77db86bb2a5
parentd25f120c10c07199844078e02436c549e3876f20 (diff)
fixed problem with null QUERY_STRING
-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
}