httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@ai.mit.edu (Robert S. Thau)
Subject Re: Shambhala0.6.0 nph script bug fix
Date Wed, 12 Jul 1995 19:47:31 GMT
   Date: Wed, 12 Jul 95 17:56 BST
   From: drtr@ast.cam.ac.uk (David Robinson)
   Precedence: bulk
   Reply-To: new-httpd@hyperreal.com

   So what's all this Shambhala program anyhow?

   Just fetched 0.6.0; first comments:

   I don't think it can reliably support nph scripts, as it uses buffered stdio
   routines for reading from the socket.  It assumes that the headers and
   any object-body sent with the request will be transmitted in completely
   separate packets, which is not guaranteed to be true.

Shambhala passes put/post arguments to CGI scripts CERN-style (by
opening a separate pipe to the script, and copying all client input up
to CONTENT_LENGTH, beginning with whatever was in the internal stdio
buffers after it finished reading the MIME headers).  This mechanism
is CGI compliant, including for NPH- scripts (which are required to
have a direct connection to the client on stdout, but not on stdin);
it better be, since CERN was one of the two original CGI
implementations. 

(One reason for this is dealing properly with keepalives in the
future, BTW --- if you give the script direct read access to the
client connection, you have to trust it to read precisely the right
number of bytes, or subsequent requests on the same connection will
get mangled.  Many scripts will be ill-behaved under these
conditions --- a problem that only gets worse for HTTP-NG, in which
PUT/POST input for the current request may actually be intermixed with
subsequent requests).

rst


Mime
View raw message