httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@nueva.pvt.k12.ca.us>
Subject Re: mod_cgi.c for M_GET...
Date Thu, 08 May 1997 06:28:26 GMT
On Wed, 7 May 1997 terrym@iquest.net wrote:

> Is there any reason for cgi_handler() to still go through the 
> child_block semantics if (r->method_number == M_GET)?  
> 
> I am running into some problems with a handler for 
> (r->method_number == M_POST) that calls a cgi through sub_req.  
> I get hung in the get_client_block() in mod_cgi.c/cgi_handler() and
> eventually timeout.  I think I am doing something stupid like
> not closing the POST input in my handler, but I still wonder
> why mod_cgi.c/cgi_handler() is trying to passthrough POST data
> even if it is a GET-ed cgi...

Because it's a legal HTTP message. Any HTTP message can contain an
entity, whether it is a request or response, regardless of method. It
is true that there is no currently defined use for a GET with body,
and no browser (that i know of) sends it, but it's still legal.

But if you're using a subrequest, and you've already taken care of any
possible POST data, your subrequest should certainly not be of method
POST. It should be GET, or a nonsense method (see
mod_include.c). Apache treats subreqs just like real requests, and if
it says POST, and there are headers corresponding to a message body,
mod_cgi will try and read them.

-- 
________________________________________________________________________
Alexei Kosut <akosut@nueva.pvt.k12.ca.us>      The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/   http://www.apache.org/


Mime
View raw message