CGI POST calls will send the data you want to the CGI process.  When
yo uare handling it yo umay need multiple reads to get it all... it
may not all be there when you do your first read.  You'll notice that
with POST you also get some headers and one of them should tell you
how much data to expect.  Therefore you can write a read loop to get
it all.

You would most likely need to check to make sure that the port is
still open as well as read from it (copy) to deal with data transfer
delays and all.

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.

Sterling

> On Wed, Apr 19, 2000, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 
>                               I've done some more digging, and it looks like Rebol 
>isn't reading
> enough data from the standard input.
> 
>  I'm getting my posted data using the following:
> 
>       stdin: make string! 128000      
>       read-io system/ports/input stdin 128000
>       raw-cgi: decode-cgi stdin
>       cgi-obj: make object! raw-cgi
> 
> Oddly different browsers send different amounts of text. With Internet
> Explorer 5.0 only the first 4096 bytes are read. With Netscape 4.7 only
> 2920 bytes are read. With Netscape 6 only 2847 bytes are read. And with
> iCab only 3688 bytes are read.
> 
> Since read-io doesn't seem to be documented anywhere, I'm not quite sure
> how to go about fixing this problem. I tried submitting this same hunk of
> text on a form on another website (my weblog on www.editthispage.com) and
> it went through just fine. So I'm assuming that this is an issue with my
> Rebol code. 
> 
> ..:Eric

Reply via email to