# HG changeset patch # User Pascal Bellard # Date 1301782652 -7200 # Node ID 0c9dab57bef3ca92a0f454419a86c81cc61c51d5 # Parent 908529298e5dcb99668e51184cb43703164aa701 busybox/httpd_helper.sh: allow simultaneous GET & POST diff -r 908529298e5d -r 0c9dab57bef3 busybox/stuff/httpd_helper.sh --- a/busybox/stuff/httpd_helper.sh Sat Apr 02 15:03:57 2011 +0000 +++ b/busybox/stuff/httpd_helper.sh Sun Apr 03 00:17:32 2011 +0200 @@ -14,7 +14,7 @@ htmlentities() { -echo $1 | sed -e 's|&|\&|g' -e 's|<|\<|g' -e 's|>|\>|g' -e 's|"|\"|g' +echo $1 | sed 's|&|\&|g;s|<|\<|g;s|>|\>|g;s|"|\"|g' } GET() @@ -73,7 +73,7 @@ eval ${1}__NAMES=\'${names# }\' } -[ "$REQUEST_METHOD" == "GET" -a -z "$GET__NAMES" ] && read_query_string GET +[ -z "$GET__NAMES" ] && read_query_string GET ddcut() { @@ -94,7 +94,7 @@ dd bs=1 count=$(($count - ($tmp * $page) )) } -if [ "$REQUEST_METHOD" == "POST" -a -z "$POST__NAMES" ]; then +if [ "$REQUEST_METHOD$POST__NAMES" == "POST" ]; then prefix=/tmp/httpd_post mkdir $prefix$$ now=$(stat -c %Y $prefix$$)