From: paul Date: Sun, 3 Jun 2018 13:08:34 +0000 (+0000) Subject: Fix for content-length and cookie variables X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=6f443220b275a3ae0df2022febe28846cc7fe2e4;p=cgilite Fix for content-length and cookie variables svn path=/trunk/; revision=68 --- 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