From 6f443220b275a3ae0df2022febe28846cc7fe2e4 Mon Sep 17 00:00:00 2001 From: paul Date: Sun, 3 Jun 2018 13:08:34 +0000 Subject: [PATCH] Fix for content-length and cookie variables svn path=/trunk/; revision=68 --- cgilite.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cgilite.sh b/cgilite.sh index b6ccd7f..394bb8f 100755 --- a/cgilite.sh +++ b/cgilite.sh @@ -36,9 +36,9 @@ if [ "$1" = '--inetd' -a -z "$REQUEST_METHOD" ]; then HTTP_HEADERS="$(sed -u '/^\r\?$/q')" HTTP_CONTENT_LENGTH="$(printf %s "$HTTP_HEADERS" |grep -oiE '^Content-Length: [0-9]+')" - HTTP_CONTENT_LENGTH="${HTTP_CONTENT_LENGTH%%: *}" + HTTP_CONTENT_LENGTH="${HTTP_CONTENT_LENGTH##*: }" HTTP_COOKIE="$(printf %s "$HTTP_HEADERS" |grep -oiE '^Cookie: [^\r]+')" - HTTP_COOKIE="${HTTP_COOKIE%%: *}" + HTTP_COOKIE="${HTTP_COOKIE##*: }" export REMOTE_ADDR SERVER_NAME SERVER_PORT REQUEST_METHOD REQUEST_URI SERVER_PROTOCOL \ PATH_INFO QUERY_STRING HTTP_CONTENT_LENGTH HTTP_COOKIE -- 2.39.2