From: Paul Hänsch Date: Wed, 3 Jun 2020 09:14:32 +0000 (+0200) Subject: bugfix: allow empty query string X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=5b013b64b7bbc9a62775ed861e9c8b34ffb3dfaa;p=cgilite bugfix: allow empty query string --- 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