wok-current rev 9454

busybox/httpd_helper.sh: allow simultaneous GET & POST
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Apr 03 00:17:32 2011 +0200 (2011-04-03)
parents 908529298e5d
children 0d51ad760686
files busybox/stuff/httpd_helper.sh
line diff
     1.1 --- a/busybox/stuff/httpd_helper.sh	Sat Apr 02 15:03:57 2011 +0000
     1.2 +++ b/busybox/stuff/httpd_helper.sh	Sun Apr 03 00:17:32 2011 +0200
     1.3 @@ -14,7 +14,7 @@
     1.4  
     1.5  htmlentities()
     1.6  {
     1.7 -echo $1 | sed -e 's|&|\&amp;|g' -e 's|<|\&lt;|g' -e 's|>|\&gt;|g' -e 's|"|\&quot;|g'
     1.8 +echo $1 | sed 's|&|\&amp;|g;s|<|\&lt;|g;s|>|\&gt;|g;s|"|\&quot;|g'
     1.9  }
    1.10  
    1.11  GET()
    1.12 @@ -73,7 +73,7 @@
    1.13  eval ${1}__NAMES=\'${names# }\'
    1.14  }
    1.15  
    1.16 -[ "$REQUEST_METHOD" == "GET" -a -z "$GET__NAMES" ] && read_query_string GET
    1.17 +[ -z "$GET__NAMES" ] && read_query_string GET
    1.18  
    1.19  ddcut()
    1.20  {
    1.21 @@ -94,7 +94,7 @@
    1.22  dd bs=1 count=$(($count - ($tmp * $page) ))
    1.23  }
    1.24  
    1.25 -if [ "$REQUEST_METHOD" == "POST" -a -z "$POST__NAMES" ]; then
    1.26 +if [ "$REQUEST_METHOD$POST__NAMES" == "POST" ]; then
    1.27  	prefix=/tmp/httpd_post
    1.28  	mkdir $prefix$$
    1.29  	now=$(stat -c %Y $prefix$$)