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

Odd behaviour when POSTing forms

 [1/3] from: stefan:falk:mytravel:se at: 13-Dec-2001 15:33


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, 'Piece of cake!' I hear you lot scream, just add a replace/all ">" ">" in the script that get the post data. But there's a problem, it shouldn't convert the '>' signs in for example <br> ... Why can't I just get to keep my > dammit?! ;-) Thanks in advance /Regards Stefan Falk www.amigaextreme.com

 [2/3] 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.
<<quoted lines omitted: 11>>
> -------------------------------------------- > 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

 [3/3] from: stefan:falk:mytravel:se at: 14-Dec-2001 9:10


Hi, I'd really appreciate your decode-cgi-thingie, sounds great! /Mvh Stefan Falk MyTravel IT Support

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted