[REBOL] Re: Odd behaviour when POSTing forms
From: tim:johnsons-web at: 13-Dec-2001 18:53
On Thu, Dec 13, 2001 at 03:33:23PM +0100, [stefan--falk--mytravel--se] wrote:
> Hi list,
> been a while since I wrote here, so I thought it was about time.
>
> When sending a form with the POST method containing a > (a '>' sign but
> anti-HTML-ized :) Rebol (or the webserver seem to convert it to a true '>'
> sign. No matter what. Here's the code used to get the posted data:
>
> --------------------------------------------
> get-posted-data: func [{Gets data transferred via the POST method}]
> [
> content-length: 20 + load system/options/cgi/content-length ; content length
> with a little to spare
> read-io system/ports/input data: make string! content-length content-length
> data: make object! decode-cgi data
> ]
> --------------------------------------------
> Is it the decode-cgi that's converting the character perhaps? Anyways,
Hello Stefan:
Yes. I would suspect that you are better off hand-rolling your
own cgi decoding. I also believe that your data object will be
mangled by decode-cgi if you have data or field names will
embedded spaces.
I could send you mine if you wish. Just give me
a holler if that's what you want. My cgi library anticipates a few
other gotchas too....
HTH
Tim