From: Paul Hänsch Date: Thu, 7 Oct 2021 23:54:38 +0000 (+0200) Subject: Squashed 'cgilite/' changes from 343a22a..24df501 X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=36e097142f62c4b30a9acc5d055f92cffc789501;p=rawnet Squashed 'cgilite/' changes from 343a22a..24df501 24df501 perform _BASE striping outside of internal web server git-subtree-dir: cgilite git-subtree-split: 24df501f00c9a9fc5ceebe1ff05e99888cca801b --- diff --git a/cgilite.sh b/cgilite.sh index 526a0fc..310dd64 100755 --- a/cgilite.sh +++ b/cgilite.sh @@ -146,7 +146,6 @@ if [ -z "$REQUEST_METHOD" ]; then SERVER_PROTOCOL="${SERVER_PROTOCOL%${CR}}" PATH_INFO="$(HEX_DECODE % "${REQUEST_URI%\?*}" |PATH)" - PATH_INFO="$(PATH "/${PATH_INFO#${_BASE}}")" [ "${REQUEST_URI}" = "${REQUEST_URI#*\?}" ] \ && QUERY_STRING='' \ || QUERY_STRING="${REQUEST_URI#*\?}" @@ -196,6 +195,8 @@ if [ "${REQUEST_METHOD}" = POST -a "${CONTENT_LENGTH:-0}" -gt 0 -a \ cgilite_post="$(head -c "$CONTENT_LENGTH")" fi +PATH_INFO="$(PATH "/${PATH_INFO#${_BASE}}")" + debug(){ [ $# -gt 0 ] && printf '%s\n' "$@" >&2 || tee -a /dev/stderr; } [ "${DEBUG+x}" ] && env >&2