Nicolas Cueto wrote:
> 
> Hi,
> 
> Sorry to persist about this...
> 
> I'm still vexed with my mt script (it's the "action" to a form, which
> processes and returns text data all via a browser) and about why, depending
> on the number of characters submitted thru a form's submit button
> (textarea), stdin sometimes successfully reads in and processes the data
> when it's under about 1500 characters, while at othertimes stdin reads
> nothing if the data is over that size -- or only reads it after I've hit the
> form's submit button umpteen times.
> 
> Most likely, this all stems from my fundamental ignorance of the http
> process. For example, Andu wrote back:
> 
> > > #!mc
> > > on startup
> > >   if $REQUEST_METHOD is "POST" then
> > >   read from stdin until eof  -- I also tried "until empty"
> >
> > There is no eof I don't think in the HTTP environment and "empty" can be
> > anywhere. You have to be more precise: you know there is crlf & crlf
> > between the header and the body so you read until you reach that point
> > then you must look in what you read (the header) for the "Content
> > Length:..." line (which your client *must* provide) and read for that
> > length.
> 
> Hmmm... I didn't know that exactly, except for seeing it at the foot of the
> survey.mt script. So, any (polite!) suggestions where I could go online to
> get a crash course on this.

Search the web for HTTP 1.0 or 1.1 RFC. It explaines how the protocol
works.

> 
> And if it's not simply my ignorace, but rather something I just haven't
> mc-scripted correctly... help! (I hate when things work only some of the
> time.)
> 
> Thank you.
> 
> Nicolas R Cueto
> 
Andu

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