]> git.plutz.net Git - clickslide/commitdiff
fix builtin header parsing
authorPaul Hänsch <paul@plutz.net>
Mon, 2 Jul 2018 01:04:55 +0000 (03:04 +0200)
committerPaul Hänsch <paul@plutz.net>
Mon, 2 Jul 2018 01:04:55 +0000 (03:04 +0200)
cgilite.sh

index 9f2eedc179227a21247578990955dcea1bb4befc..f0f2fa90a02e0883e84b5b3c88b32b50eb6ced20 100755 (executable)
@@ -30,7 +30,7 @@ HEADER(){
   # referencing HTTP_* environment variables.
   if [ -n "${cgilite_headers+x}" ]; then
     printf %s "$cgilite_headers" \
-    | sed -rn 's;^'"${1}"': ([^\r]+)\r?$;\1;ip;q;'
+    | sed -rn 's;^'"${1}"': ([^\r]+)\r?$;\1;i; tX; d; :X;p;q;'
   else
     eval "printf %s \"\$HTTP_$(printf %s "${1}" |tr a-z A-Z |tr -c A-Z _)\""
   fi