Re: [PATCH v5 19/40] lib-httpd: add upload.sh

2017-09-14 Thread Christian Couder
On Thu, Aug 3, 2017 at 10:07 PM, Junio C Hamano wrote: > Christian Couder writes: > >> +OLDIFS="$IFS" >> +IFS='&' >> +set -- $QUERY_STRING >> +IFS="$OLDIFS" >> + >> +while test $# -gt 0 >> +do >> +key=${1%=*} >> +val=${1#*=} > > When you see that ${V%X*} and ${V#*X} appear in a pair for t

Re: [PATCH v5 19/40] lib-httpd: add upload.sh

2017-08-03 Thread Junio C Hamano
Christian Couder writes: > +OLDIFS="$IFS" > +IFS='&' > +set -- $QUERY_STRING > +IFS="$OLDIFS" > + > +while test $# -gt 0 > +do > +key=${1%=*} > +val=${1#*=} When you see that ${V%X*} and ${V#*X} appear in a pair for the same variable V and same delimiter X, it almost always indicates a b

[PATCH v5 19/40] lib-httpd: add upload.sh

2017-08-03 Thread Christian Couder
This cgi will be used to upload objects to, or to delete objects from, an apache web server. This way the apache server can work as an external object database. Signed-off-by: Christian Couder --- t/lib-httpd.sh| 1 + t/lib-httpd/upload.sh | 45 +