# HG changeset patch # User Pascal Bellard # Date 1307809501 -7200 # Node ID f564323fc5a470b015df52af08d85d145fcba8eb # Parent 6390498a6cd159b8ba32872f354bc96fbe50b233 busybox/httpd_helper.sh: do not loose last char with multipart/form-data POST diff -r 6390498a6cd1 -r f564323fc5a4 busybox/stuff/httpd_helper.sh --- a/busybox/stuff/httpd_helper.sh Sat Jun 11 17:53:28 2011 +0200 +++ b/busybox/stuff/httpd_helper.sh Sat Jun 11 18:25:01 2011 +0200 @@ -122,8 +122,9 @@ n=1 cat > ${post}0 read delim < ${post}0 + delim=${delim%?} case "$delim" in - -*) awk "/${delim%?}/ { o+=index(\$0,\"$delim\")-1; print o } + -*) awk "/$delim/ { o+=index(\$0,\"$delim\")-1; print o } { o+=1+length() }" < ${post}0 | while read offset; do if [ $offset -ne 0 ]; then ddcut $last $offset < ${post}0 > $post$n 2> /dev/null