From: Paul Hänsch Date: Wed, 27 Jul 2022 12:01:10 +0000 (+0200) Subject: bugfix/typo: correct transformation of header fields into web server variable names X-Git-Url: http://git.plutz.net/?p=cgilite;a=commitdiff_plain;h=9a075962cbcf68050e57afa257bae4232cc197ee bugfix/typo: correct transformation of header fields into web server variable names --- diff --git a/cgilite.sh b/cgilite.sh index 2193e29..b51ee8e 100755 --- a/cgilite.sh +++ b/cgilite.sh @@ -264,7 +264,7 @@ HEADER(){ str="${str#*${BR}${1}: }" printf %s "${str%%${BR}*}" else - local var="HTTP_$(printf %s "$1" |tr a-z- A-Z-)" + local var="HTTP_$(printf %s "$1" |tr a-z- A-Z_)" eval "[ \"\$$var\" ] && printf %s \"\$$var\" || return 1" # eval "printf %s \"\$HTTP_$(printf %s "${1}" |tr a-z A-Z |tr -c A-Z _)\"" fi