On Tue, 26 Jun 2001 jbv <[EMAIL PROTECTED]> wrote:

> We have MChttp installed on our local mail server
> running Apache, and I've been doing various
> client / server tests and scripts.

I'm not sure I follow this.  Are you referring to "mchttpd", the
MetaCard HTTP server, or something else?  I think probably the latter
because you use mchttpd *instead* of Apache, not with it.

> Everything works fine & fast, except that I noticed
> that long cgi requests using POST method from a
> browser get truncated...
> 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.

> Could this be a limitation of MChttp ?
> And, if yes, is there a way to bypass it for long
> cig requests featuring a large number of parameters
> and uploading files ?

Again, you lost me here.  There's no reason to upload a file through a
CGI, and in fact this would be an inefficient way to do it (i.e., you
should use "PUT" instead of "POST".)  Second, parameters come in as
environment variables ($1, $2, etc.), not via stdin on UNIX systems.
  Regards,
    Scott

> Thanks.
> 
> JB

********************************************************
Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...


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