slitaz-base-files rev 111 4.4.2
httphelper: do not loose last char for POST
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Mar 28 13:34:59 2012 +0200 (2012-03-28) |
parents | d1457c979903 |
children | 5e7a512a6758 |
files | rootfs/usr/lib/slitaz/httphelper |
line diff
1.1 --- a/rootfs/usr/lib/slitaz/httphelper Fri Mar 23 22:17:03 2012 +0000 1.2 +++ b/rootfs/usr/lib/slitaz/httphelper Wed Mar 28 13:34:59 2012 +0200 1.3 @@ -153,8 +153,8 @@ 1.4 post=$prefix$$/post 1.5 n=1 1.6 cat > ${post}0 1.7 - read delim < ${post}0 1.8 - delim=${delim%?} 1.9 + read args < ${post}0 1.10 + delim="${args%?}" 1.11 case "$delim" in 1.12 -*) awk "/$delim/ { o+=index(\$0,\"$delim\")-1; print o } 1.13 { o+=1+length() }" < ${post}0 | while read offset; do 1.14 @@ -214,7 +214,7 @@ 1.15 done 1.16 rmdir $(dirname $post) ;; 1.17 *) rm -rf $(dirname $post) 1.18 - read_query_string POST "$delim" ;; 1.19 + read_query_string POST "$args" ;; 1.20 esac 1.21 fi 1.22