[REBOL] Re: Antwort: CGI POST input
From: rex:smallandmighty at: 19-Nov-2000 20:59
On Sun, Nov 19, 2000, Joel Neely <[joel--neely--fedex--com]> wrote:
>My problem was a REBOL problem, not a browser nor a GET-vs-POST
>problem. I was already using POST. The problem was that I still
>wasn't getting all of the data into REBOL. When I rewrote the
>script using Perl, all of the data showed up.
>I'm going to test the idea from the REBOL FAQ (URL in Allen's reply)
>and report back on whether that solved the problem.
I was having the *exact* same problem in my Rebol webserver. The only
thing that worked reliably for me was looping on read-io, and my server
does regularly handles submissions from large ( >20k ) forms. One of my
tests was a text version of my Bachelor's thesis, and that was 216k.
Since my webserver has to handle multiple connections I use a couple
of queues, one for writing, and one for reading. Both send little chunks
of data with write-io or read-io, and keep track of how much was sent or
received so they know when to stop. I don't do keep-alives.
Incidentally, during my testing, I also noticed that Netscape and IE
have very different patterns of I/O. It is quite possible (I know because
I inadvertently did it...) to write some code that reads a POST reliably
from IE, but not Netscape. There also seems to be a maximum amount of
data that the browsers can send from a text area. Each browser has a
different max. Figure somewhere around 30k. I don't remember exactly. But
any more gets truncated by the browser, not Rebol. Also, IE will let you
use the PUT method with a form, whereas Netscape won't. My server handles
PUTs exactly like POSTs.
I know I should probably recode my read and write queue code to use
copy or insert, but it's been working really well since August, and I
have too much other code external to my core webserver code to fix. Plus,
I'd like to get it running on Mac OS X, but that's stuck with Rebol 2.2,
and I think I need 2.3+ for the new networking stuff to work.
My server's gotten too chubby (800+ lines, excluding handlers) to
post to the list, but it's pretty well commented, so I could send email
it to you if you like. When I've cleaned out some of the esoteric cruft I
need for the applications I'm using it for, I'll post it up on one of my
websites, so others can play with it.