[REBOL] Re: retrieve-user-data needs help
From: gjones05:mail:orion at: 4-May-2001 7:16
> I'm trying to incorporate my 'decode-multipart/form-data function into the
> commonly used 'retrieve-user-data function, but I am getting something
> wrong. The function works now for GET operations but not for POST.
> If I use 'read-io on system/ports/input, that clears the port, correct?
On May 2nd on a different thread ("read bug?"), Holger said (excerpt):
About the other problem, i.e. getting data from a POST request
within a REBOL CGI script: keep in mind that read-io is a
very-low-level read request that returns as soon as the OS
returns something. The amount of data returned is not necessarily
what was requested. It can be less. This is not a bug, it is by
design. If you see a limit of around 4096 bytes then this is caused
by how the OS clusters its data. What you need to do in a CGI
script is loop until read-io returns 0, e.g.
cgi-str: make string! 100000
while [0 < read-io system/ports/input cgi-str 100000] 
I've not had a chance to play with this approach. Maybe it will help.