From 5b013b64b7bbc9a62775ed861e9c8b34ffb3dfaa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Wed, 3 Jun 2020 11:14:32 +0200 Subject: [PATCH] bugfix: allow empty query string --- cgilite.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cgilite.sh b/cgilite.sh index bee93d8..86ad280 100755 --- a/cgilite.sh +++ b/cgilite.sh @@ -77,7 +77,9 @@ if [ -z "$REQUEST_METHOD" ]; then SERVER_PROTOCOL="${SERVER_PROTOCOL%${CR}}" PATH_INFO="$(HEX_DECODE "${REQUEST_URI%\?*}" |PATH)" - QUERY_STRING="${REQUEST_URI#*\?}" + [ "${REQUEST_URI}" = "${REQUEST_URI#*\?}" ] \ + && QUERY_STRING='' \ + || QUERY_STRING="${REQUEST_URI#*\?}" cgilite_headers=''; while read -r hl; do hl="${hl%${CR}}"; [ "$hl" ] || break case $hl in -- 2.39.2