Mailing List Archive

Shambhala0.6.0 nph script bug fix
NPH scripts weren't being properly handled...
A few line patch is at: http://www.netgen.com/~mkgray/apache/mod_cgi.patch

How should patches be handled now? Has there been any real resolution on
Apache0.7/Shambhala0.x ???

...Mkgray
Re: Shambhala0.6.0 nph script bug fix [ In reply to ]
Date: Mon, 10 Jul 1995 20:42:01 -0400 (EDT)
From: Matthew Gray <mkgray@netgen.com>
X-Sender: mkgray@bokonon
Organization: net.Genesis
Precedence: bulk
Reply-To: new-httpd@hyperreal.com

NPH scripts weren't being properly handled...
A few line patch is at: http://www.netgen.com/~mkgray/apache/mod_cgi.patch

Hmmm... could you say how they were being mishandled? It may be
something which would pop up as well in other contexts, in which case
some more systemic fix would be appropriate.

(This patch inserts a wait() call to wait for the nph- CGI process,
but that wait() should be done anyway when the per-transaction
resource pool is cleared, the same way it is done for more ordinary
CGI scripts; in any case, on SunOS, invoking an nph- script through
stock 0.6.0 does not appear to generate zombies. If zombies are
appearing anyway, perhaps on systems other than SunOS, it means that
the spawn_child() machinery is failing to mop them up, which should be
fixed by fixing the child-process stuff in alloc.c, rather than by
papering over the problem).

How should patches be handled now? Has there been any real resolution on
Apache0.7/Shambhala0.x ???

I've generally been taking patches as they're sent to me, just taking
them out of the email and applying them directly to my sandbox in most
cases (so long as I understand what the bug is). As to the name
thing, the next release of Shambhala may very well call itself Apache
0.8, barring serious objections.

rst
Re: Shambhala0.6.0 nph script bug fix [ In reply to ]
+1 for calling shambhala apache 0.8

Cliff
Re: Shambhala0.6.0 nph script bug fix [ In reply to ]
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.

N.B. I haven't tested this.

David.
Re: Shambhala0.6.0 nph script bug fix [ In reply to ]
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