Received: (from majordom@localhost) by hyperreal.com (8.8.5/8.8.5) id XAA02982; Wed, 7 May 1997 23:28:37 -0700 (PDT) Received: from plato.alameda-coe.k12.ca.us (plato.alameda-coe.k12.ca.us [206.110.1.34]) by hyperreal.com (8.8.5/8.8.5) with SMTP id XAA02977 for ; Wed, 7 May 1997 23:28:35 -0700 (PDT) Received: from pappilloma.wwebsvs.com by plato.alameda-coe.k12.ca.us with smtp (Smail3.1.29.1 #5) id m0wPMY3-000OaRC; Wed, 7 May 97 23:19 PDT Received: from ace.nueva.pvt.k12.ca.us by pappilloma.wwebsvs.com (SMI-8.6/SMI-SVR4) id WAA27483; Wed, 7 May 1997 22:24:48 -0700 Received: from localhost by ace.nueva.pvt.k12.ca.us with SMTP (1.37.109.20/15.5+ECS 3.3+HPL1.1) id AA101322906; Wed, 7 May 1997 23:28:26 -0700 Date: Wed, 7 May 1997 23:28:26 -0700 (PDT) From: Alexei Kosut To: new-httpd@apache.org Subject: Re: mod_cgi.c for M_GET... In-Reply-To: <19970508031804.23858.qmail@iquest9.iquest.net> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org 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 The Apache HTTP Server URL: http://www.nueva.pvt.k12.ca.us/~akosut/ http://www.apache.org/