wok rev 9455

busybox/httpd_helper.sh: do not loose last POST
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Apr 03 01:44:05 2011 +0200 (2011-04-03)
parents 0c9dab57bef3
children 13f6147d93f0
files busybox/stuff/httpd_helper.sh
line diff
     1.1 --- a/busybox/stuff/httpd_helper.sh	Sun Apr 03 00:17:32 2011 +0200
     1.2 +++ b/busybox/stuff/httpd_helper.sh	Sun Apr 03 01:44:05 2011 +0200
     1.3 @@ -106,7 +106,7 @@
     1.4  	cat > ${post}0
     1.5  	read delim < ${post}0
     1.6  	case "$delim" in
     1.7 -	-*)	awk "/$delim/ { o+=index(\$0,\"$delim\")-1; print o }
     1.8 +	-*)	awk "/${delim%?}/ { o+=index(\$0,\"$delim\")-1; print o }
     1.9  	   		  { o+=1+length() }" < ${post}0 | while read offset; do
    1.10  		    if [ $offset -ne 0 ]; then
    1.11  			ddcut $last $offset < ${post}0 > $post$n 2> /dev/null