From 36e097142f62c4b30a9acc5d055f92cffc789501 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Fri, 8 Oct 2021 01:54:38 +0200 Subject: [PATCH] Squashed 'cgilite/' changes from 343a22a..24df501 24df501 perform _BASE striping outside of internal web server git-subtree-dir: cgilite git-subtree-split: 24df501f00c9a9fc5ceebe1ff05e99888cca801b --- cgilite.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.2