On Thu, Apr 20, 2000, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
:here is one such loop for reading whole POSTed data:
:
:tmp: load any [system/options/cgi/content-length "0"]
:buffer: make string! (tmp + 10)
:while [tmp > 0][tmp: tmp - read-io system/ports/input buffer tmp]
That's similar to the one I cooked up yesterday.
:> Also, decode-cgi is only for the GET request and not for POST. Yo
:> uwill find that POST data has a more complex structure... almost like
:> an email with attachments. You will have to deal with that data
:> yourself.
:
:That's not right.
:The default encoding for POST is the same as for GET, i.e.
:application/x-www-form-urlencoded.
One gotcha I hit last night, is that if you're
creating forms on the
fly from user input, the cgi object created from decode-cgi's output
might need to have its set-words dehexed.
.:Eric