Hi,

As suggested (thank you Andu and Phil Davis), (1) I'm checking 
the HTTP protocol (ok, I'm seeing somewhat how it works, but 
how do I translate that into MC language?), and (2) posted on 
Google's Unix-server newsgroup (replies there: either the MC 
method is broken, an "out of scope" error in my loop test (?),
and that there is "no eof" for the POST data stream), _BUT_
I'd like to keep plugging away at it here. Sorry!

In a related post, Scott Raney replied to JB thus 
[capitalization is mine]:

-----------------------------------------
>> My script use the following command :
>>    read from stdin until empty
>
> This only reads until there's no more to read *at that time*, not
> until the process at the other end of the pipe has finished writing.
> You'll need to either EXECUTE THIS COMMAND REPEATEDLY 
> until you get the amount of data you're expecting, or use "READ
> UNTIL EOF" instead.
>
>> I asked the sysop, and indeed there seems to be
>> a buffer of 1024 chars under Unix for the use
>> of stdin in the command shell...
>
> The actual buffer size depends on the version of UNIX and even on what
> type of descriptor is being written to and what the two ends are
> connected to.  And the amount you'll get in a given "read until empty"
> also depends on CPU scheduling and how the process on the other end
> wrote it out.  But NONE OF THIS SHOULD MATTER IF YOU DO THE
> READS CORRECTLY.
---------------------------------------
(http://www.mail-archive.com/[email protected]/msg03228.html)


Anyone care to offer a _variety_ of examples of correct syntax on
how to read POST data thru stdin either en masse or in chunks?

Here again is my example, and which, as I wrote,  "fails" to 
read POST data when it is over about 1000 chars (probably 
1024 bytes on Unix?):

#!mc
  on startup
    if $REQUEST_METHOD is "POST" then
    read from stdin until eof  -- I also tried "until empty"
    put it into url "file:TheData.txt"
    put it into tTheData

Thank you.

Nicolas R Cueto




Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to