X-Git-Url: http://git.plutz.net/?p=serve0;a=blobdiff_plain;f=cgilite%2Fcgilite.sh;h=310dd64a0f4e99280c99b1eca756e93e7f2aa97c;hp=a2aa32924bdc7ed30cc35fb053b416859a05f93c;hb=cfb24f8d9e3106608a08603d22f67816621dc807;hpb=f97b078b5e7fde01e2cbe97585ed58a4f8773fc9 diff --git a/cgilite/cgilite.sh b/cgilite/cgilite.sh index a2aa329..310dd64 100755 --- a/cgilite/cgilite.sh +++ b/cgilite/cgilite.sh @@ -48,7 +48,7 @@ _EXEC="${_EXEC:-${0%/*}}" _DATA="${_DATA:-.}" _EXEC="${_EXEC%/}" _DATA="${_DATA%/}" _BASE="${_BASE%/}" -# Carriare Return and Line Break characters for convenience +# Carriage Return and Line Break characters for convenience CR=" " BR=' ' @@ -90,7 +90,7 @@ HEX_DECODE(){ *) out="${out}${in%"${in#?}"}"; in="${in#?}"; continue;; esac; - # Hex escaes for printf (e.g. \x41) are not portable + # Hex escapes for printf (e.g. \x41) are not portable # The portable way for Hex output is transforming Hex to Octal # (e.g. \x41 = \101) case $in in @@ -195,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