Hello [EMAIL PROTECTED]!
On 20-Feb-00, you wrote:
s> tmp: load system/options/cgi/content-length
s> buffer: make string! (tmp + 10)
s> read-io system/ports/input buffer tmp
AFAIK this could not read all the data. I think it's better to use
something like:
while [tmp > 0] [tmp: tmp - read-io system/ports/input buffer tmp]
s> system/options/cgi/content-length but it is quaranteed that
s> content-length will be send everytime by each browser (or
s> another user-agent)? (question for Holger?)
The browser MUST include the Content-Length header if it is
sending data. If it doesn't, the server cannot tell how much data
to wait for.
s> what about reading stdin by this way:
s> instr: make string! 5 * 1024 while [found? tmp: pick
s> system/ports/input 1][append instr tmp]
Rather slow IMHO... and it will not work in case of binary data
(well, that shouldn't be your case anyway).
Regards,
Gabriele.
--
o--------------------) .-^-. (----------------------------------o
| Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
| GIESSE on IRC \ \-\_/-/ / http://www.amyresource.it/AGI/ |
o--------------------) `-v-' (----------------------------------o