Lynn,
you can try this function.
It parses the Environment variable REQUEST_URI, which is suppplied
by sh-httpd.
It sets the environment variables <parameter> to <value>
as if the xxx=yyy is included in the script.
getinfo() {
setpar() {
if [ "$2" = "" ] ; then
setvar cgi_$1 1
else
setvar cgi_$1 $2
fi
}
OIFS="$IFS"
IFS="?"
set -- $REQUEST_URI
cgi_SCRIPT="$1"
cgi_QUERY="$2"
if [ "$cgi_QUERY" != "" ] ; then
IFS="&"
set -- $cgi_QUERY
IFS="="
while [ "$1" != "" ] ; do
setpar $1
shift
done
fi
IFS="$OIFS"
}
guitarlynn schrieb:
>
> I've got a minimal configuration form/cgi that I would like to test
> before posting for weblet. It works via Apache on my local webserver,
> however I have been unable to get the sh-httpd POST patch to work.
>
> I've figured I could simply use the GET method to work, however I have
> been unable to figure out how to parse the $QUERY_STRING into a
> read-able set of variables (replace the "&"'s with "/n"'s). I've also
> tried to use "uncgi" with it, but "uncgi" does not work with sh-httpd
> (it attemps only the literal path instead of "/binary/option").
>
> Does anyone have a sed or cut script to parse $QUERY_STRING into
> something friendlier to a sh cgi?
>
> --
>
> ~Lynn Avants
> aka Guitarlynn
>
> guitarlynn at users.sourceforge.net
> http://leaf.sourceforge.net
>
> If linux isn't the answer, you've probably got the wrong question!
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
>
> _______________________________________________
> Leaf-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/leaf-devel
--
Manfred Schuler
Beerenweg 4
31275 Lehrte
Tel.: (0 51 75) 66 54
Fax: (07 21) 1 51 22 22 17
E_Mail: mailto:[EMAIL PROTECTED]
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel