[REBOL] Re: Newbi CGI question
From: compkarori:gma:il at: 5-Mar-2006 5:38
I think you'll find that the second method will lose data on large posts.
The data lost is dependent upon the OS.
On 3/5/06, Kai Peters <kpeters-vu-ware.com> wrote:
>
> Hi all ~
>
> Carl Sassenrath uses the following construct in his CG tutorial
> "Creating and Processing Web Forms with CGI":
>
> switch system/options/cgi/request-method [
> "POST" [
> data: make string! 1020
> buffer: make string! 16380
> while [positive? read-io system/ports/input buffer 16380][
> append data buffer
> clear buffer
> ]
> ]
> "GET" [data: system/options/cgi/query-string]
> ]
> data
>
> Goldman & Blanton simply use 'input to retrieve POSTed data
>
> switch system/options/cgi/request-method [
> "POST" [data: input ]
> ] [
> "GET" [data: system/options/cgi/query-string]
> ]
> data
> ]
>
--
Graham Chiu
http://www.compkarori.com/emr/