Ryan, your little change in 'decode-cgi works perfectly well, thanks. I submitted it
to feedback, and take it this "bug" is simply a blunder that will be fixed in the next
release.
~H
Dixit Ryan Cole (21.10 21.01.2002):
>Hey Hallvard,
>
>In my opinion "garbage in, garbage out." But since the issue
>seemed so straight forward, I could'nt resist making the
>fix.
>
>decode-cgi: func [
> {Converts CGI argument string to a list of words and
>value strings.}
> args [any-string!] "Starts at first argument word"
> /local list equate value name val plus-to-space
>][
> plus-to-space: func [arg /local seek chr] [
> if any [none? arg empty? arg] [return ""]
> seek: arg
> while [seek: find seek #"+"] [
> change seek #" "
> seek: next seek
> ]
> head arg
> ]
> list: make block! 8
> equate: [copy name to "=" "=" (if name [append list
>to-set-word name]) value]
> value: ["&" (append list copy "") | [copy val to "&" "&"
>| copy val to end
>]
> (append list either none? val [copy ""] [form dehex
>plus-to-space val]
>)]
> parse/all args [some equate | none]
> list
>]
>
>>> probe make object! probe decode-cgi "t=1&=ff"
>[t: "1" "ff"]
>
>make object! [
> t: "1"
>]
>>>
>
>This I will leave it up to you to test it and submit to
>feedback.
>
>--Ryan
>
>
>--
>To unsubscribe from this list, please send an email to
>[EMAIL PROTECTED] with "unsubscribe" in the
>subject, without the quotes.
Pr�tera censeo Carthaginem esse delendam
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.