Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: decode-cgi bug (?)

From: inetw3:mindspring at: 10-Feb-2004 17:29

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 s&board=cult.tamaraswift&&sort=T" char_block: ["=" {: "} "&" {" } { " } " "] decode_cgi: func [cgi][ replace/all cgi " " " " replace/all cgi "=" {: "} replace/all cgi "&" {" } replace/all cgi { " } " " append cgi {"} cgi: to-block cgi cgi_object: make object! cgi ] decode_cgi cgi probe cgi_object ----- Original Message ----- From: Hallvard Ystad <[hallvard--ystad--oops-as--no]> To: <[rebol-list--rebol--com]> Sent: Monday, February 09, 2004 4:07 PM Subject: [REBOL] decode-cgi bug (?)
> Hi > > 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 &&sort=T
> This crashes 'decode-cgi in /core 2.5.6: > >> decode-cgi "state=threads&board=cult.tamaraswift&&sort=T" > ** Script Error: Out of range or past end > ** Where: to-set-word > ** Near: to set-word! :value > >> > > 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?