Hi.

I wanna ask what's the latest recomended way to read data submitted 
from some www page with form by POST method.

I use:

  tmp: load system/options/cgi/content-length
  buffer: make string! (tmp + 10)
  read-io system/ports/input buffer tmp

  ...
  decode-cgi buffer 



but IMHO it's quite ugly.
And when calling the cgi "manually" without any data submission,
it throw an error (as excepted).
Of course I can check if found? system/options/cgi/content-length
but it is quaranteed that content-length will be send everytime
by each browser (or another user-agent)? (question for Holger?)

what about reading stdin by this way:

instr: make string! 5 * 1024
while [found? tmp: pick system/ports/input 1][append instr tmp]   

What are using You?

Thanks.
Jan

--
Jan Strejcek
[EMAIL PROTECTED]

Reply via email to