Thursday, February 19, 2004, 5:18:19 PM, Will wrote:
> there seems to be a bug in your function:
>>> decode-cgi "a=1&b=&c=3"
> == [a: "1" b: "1" c: "3"]
thanks for reporting, will. fixed:
decode-cgi: func [
{Converts CGI argument string to a list of words and value strings.}
args [
Hi Andres,
there seems to be a bug in your function:
>> decode-cgi "a=1&b=&c=3"
== [a: "1" b: "1" c: "3"]
Will
On 10-feb-04, at 00:50, Andreas Bolka wrote:
> -- snip --
> decode-cgi: func [
> {Converts CGI argument string to a list of words and value
> strings.}
> args [any-string!
Hi Hallvard,
Would this help any?
you can replace the " replace/all "this" "this" "
with a "foreach char_block" and "parse cgi (replace cgi "this" "this")
--
cgi: "state=thread%20s&board=cult.tamaraswift&
Hi Tim,
by my count it is in the sixth post of this thread.
the basic idea is to brighten up decode-cgi so it can
return a block of set words instead of a block of string pairs.
which can be coerced into an honest to goodness OBJECT
So CGI processing would seem more similar to the way some othe
* Andreas Bolka <[EMAIL PROTECTED]> [040210 06:04]:
>
>
> Tuesday, February 10, 2004, 12:47:11 AM, Tim wrote:
>
> > I want to note that I modified decode-cgi so that a block of string
> > pairs is returned rather than a block of alternating to-set-word
> > types and strings.
>
> > Reason for i
* Tom Conlin <[EMAIL PROTECTED]> [040209 17:04]:
>
>
>
> that is exactly the sort of thing 'vet-word avoids.
Tom:
Tell me more about 'vet-word,
if you can.
thanks
tim
> it is obviously a work in progress and of all the unsatisfaftory
> side effects I think the least unsati
Tuesday, February 10, 2004, 12:47:11 AM, Tim wrote:
> I want to note that I modified decode-cgi so that a block of string
> pairs is returned rather than a block of alternating to-set-word
> types and strings.
> Reason for it: A rebol cgi program might be processing a form in
> which field name
that is exactly the sort of thing 'vet-word avoids.
it is obviously a work in progress and of all the unsatisfaftory
side effects I think the least unsatisfaftory is yet to be found.
On Mon, 9 Feb 2004, Tim Johnson wrote:
>
> * Hallvard Ystad <[EMAIL PROTECTED]> [040209 13:31]:
> It looks l
Monday, February 9, 2004, 11:07:27 PM, Hallvard wrote:
> I know some people say "garbage in - garbage out", but one can't
> always control what comes into one's programs as input. Here's what
> came to one of mine:
> http://www.bbc.co.uk/cgi-perl/h2/h2.cgi?state=threads&board=cult.tamaraswift&&
* Hallvard Ystad <[EMAIL PROTECTED]> [040209 13:31]:
It looks like Hallvard's problem is being addressed, but I want to
note that I modified decode-cgi so that a block of string pairs
is returned rather than a block of alternating to-set-word types
and strings.
Reason for it:
A rebol cgi progra
Brilliant. Thanks!
But:
>> decode-cgi
>> {url=http%3A//www.bbc.co.uk/cgi-perl/h2/h2.cgi%3Fstate%3Dthreads%26board%3Dcult.tamaraswift%26%26sort%3DT}
== [url: "http://www.bbc.co.uk/cgi-perl/h2/h2.cgi?state";]
>>
Phew. This time I _really_really_ am off to bed.
HY
Dixit Tom Conlin (00.24 10.02.2
ok here is a version that allows multiple &'s
decode-cgi: func [args [any-string!] /raw
/local cgi-block name value mark here
][
all[empty? args return ""]
structural: make bitset! "+&=%"
non-struct: complement structural
xchar: make bitset! {0123456789ABCDEFabcdef}
safe-xchar: make bitset
Sorry, Tom,
your script fails to get the 'sort parameter too.
This time I'm _really_ off to bed.
HY
Dixit Tom Conlin (00.02 10.02.2004):
>howdy,
>
>I was fiddling with this recently hoping to get an improved version into
>view 1.3. there are different thoughts on 'decode-cgi should be a
>high
howdy,
I was fiddling with this recently hoping to get an improved version into
view 1.3. there are different thoughts on 'decode-cgi should be a
higher/lower level function my belief is it should be pretty dumb and
just break strings up on a structural basis. but that leads to newby
biting whic
Oh, I tried with the source from /view 1.2.10, but got the same result. Could you
perhaps send me the code? Getting the parameter with the ampersand is better than
nothing, after all...
Thanks,
HY
Dixit [EMAIL PROTECTED] (23.32 09.02.2004):
>Hallvard:
>
>> I believe Andreas Bolka and/or Andre
Thanks, Will,
but no, this doesn't fix the problem. The URL I found had two adjacent &s:
state=threads&board=cult.tamaraswift&&sort=T
I think whoever made this URL ment for sort=T to join in, but your code doesn't let
it. I only get state and board.
Any ideas? (I'll look into it more closely m
Hi Hallvard;
this one work on your url, it also has some enhancement
most preferred is ability to set a: "" when http://dom.com?a
I'm not sure who is the author but thanks, and shouldn't this version
replace
rebol's one?
Hope that helps and have a great day!
Will Arp
[EMAIL PROTECTED]
;core
Hallvard:
> I believe Andreas Bolka and/or Andrew Martin made a patch to 'decode-cgi
some
> time back, but can't seem to find it. Does anyone know whether the patch
> fixes this problem? Or perhaps where I can find it?
decode-cgi works under View (at least where I am). (Core fails here, just
18 matches
Mail list logo