account for Different CGI variable naming in apache
authorpaul <paul@plutz.net>
Tue, 8 Nov 2016 17:28:44 +0000 (17:28 +0000)
committerpaul <paul@plutz.net>
Tue, 8 Nov 2016 17:28:44 +0000 (17:28 +0000)
svn path=/trunk/; revision=40

cgi.sh

diff --git a/cgi.sh b/cgi.sh
index 206f322..c366843 100755 (executable)
--- a/cgi.sh
+++ b/cgi.sh
@@ -34,7 +34,7 @@ printf '%s\n' "$QUERY_STRING" |tr '&' '\n' |while read query; do
   debug "_GET[$key] => $val"
 done
 
-if [ "$REQUEST_METHOD" = POST -a "$HTTP_CONTENT_LENGTH" -gt 0 ]; then
+if [ "$REQUEST_METHOD" = POST -a "${HTTP_CONTENT_LENGTH:=$CONTENT_LENGTH}" -gt 0 ]; then
   # parse HTTP POST string
   debug "== CGI DATA: POST =="
   head -c "$HTTP_CONTENT_LENGTH" \