Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 95102 invoked from network); 8 Jul 2004 16:59:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Jul 2004 16:59:42 -0000 Received: (qmail 15221 invoked by uid 500); 8 Jul 2004 16:59:34 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 15182 invoked by uid 500); 8 Jul 2004 16:59:33 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 15166 invoked by uid 99); 8 Jul 2004 16:59:33 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [66.198.51.121] (HELO colo.lerdorf.com) (66.198.51.121) by apache.org (qpsmtpd/0.27.1) with ESMTP; Thu, 08 Jul 2004 09:59:32 -0700 Received: from rasmus2.corp.yahoo.com (rasmus2.corp.yahoo.com [207.126.233.18]) by colo.lerdorf.com (8.12.11/8.12.11/Debian-5) with ESMTP id i68GxU9h013340 for ; Thu, 8 Jul 2004 09:59:30 -0700 Date: Thu, 8 Jul 2004 09:59:25 -0700 (PDT) From: Rasmus Lerdorf X-X-Sender: rasmus@thinkpad.lerdorf.com To: dev@httpd.apache.org Subject: Re: Time for 1.3.32 ? In-Reply-To: <59500660-CF4D-11D8-BB1B-000393D76AB8@jaguNET.com> Message-ID: References: <200407031324.i63DO4608162@devsys.jaguNET.com> <59500660-CF4D-11D8-BB1B-000393D76AB8@jaguNET.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on colo X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Ok, how about this. Add a call to ap_set_keepalive(r) in ap_die() before the check to see if we should be discarding the request body. Then, since ap_set_keepalive increments the keepalives counter on the connection if keepalive is determined to be enabled, add a check to the calls in ap_send_http_header and ap_send_error_response since these could be called after ap_die and we don't want to increment the keepalives counter twice on this request. Index: http_protocol.c =================================================================== diff -u -r1.76 http_protocol.c --- http_protocol.c 21 May 2004 11:43:31 -0000 1.76 +++ http_protocol.c 8 Jul 2004 16:49:03 -0000 @@ -2074,7 +2074,7 @@ PUSH_EBCDIC_OUTPUTCONVERSION_STATE_r(r, 1); #endif /*CHARSET_EBCDIC*/ - ap_set_keepalive(r); + if(r->connection->keepalive != 1) ap_set_keepalive(r); #ifdef YAHOO #ifdef GZIP @@ -3063,7 +3063,7 @@ ap_hard_timeout("send 304", r); ap_basic_http_header(r); - ap_set_keepalive(r); + if(r->connection->keepalive != 1) ap_set_keepalive(r); ap_table_do((int (*)(void *, const char *, const char *)) ap_send_header_field, (void *) r, r->headers_out, Index: http_request.c =================================================================== diff -u -r1.29 http_request.c --- http_request.c 21 May 2004 11:43:31 -0000 1.29 +++ http_request.c 8 Jul 2004 16:49:03 -0000 @@ -1116,6 +1116,12 @@ } /* + * We need r->connection->keepalive set correctly in order to determine if + * we can discard the request body in the next condition + */ + ap_set_keepalive(r); + + /* * If we want to keep the connection, be sure that the request body * (if any) has been read. */ On Tue, 6 Jul 2004, Jim Jagielski wrote: > Yes, we do, and we're still waiting for a patch. However, > I can't see us delaying 1.3.32 for an "unreasonable" > amount of time. > > On Jul 5, 2004, at 10:54 AM, Rasmus Lerdorf wrote: > > > We still have that outstanding issue of conn->keepalive being bogus in > > ap_die() because it hasn't been set yet and thus we can't discard the > > request body in situations where we really need to. See my previous > > long > > explanation of that problem. > > > > -Rasmus > > > > On Sat, 3 Jul 2004, Jim Jagielski wrote: > > > >> Let's use STATUS :) > >> > >> =?ISO-8859-15?Q?Andr=E9?= Malo wrote: > >>> > >>> * Jeff Trawick wrote: > >>> > >>>> well, if you're going to be that way then consider my simple Win32 > >>>> patch to > >>>> fix reporting of proper error by spawnl(), which needs another +1 :) > >>>> > >>>> (see thread "[1.3 PATCH] restore failing errno for Win32 spawn > >>>> errors" on > >>>> this list) > >>> > >>> +1 from me for that errno patch ;) > >>> > >>> nd > >>> -- > >>> "Umfassendes Werk (auch fuer Umsteiger vom Apache 1.3)" > >>> -- aus einer Rezension > >>> > >>> > >>> > >> > >> > >> -- > >> ====================================================================== > >> ===== > >> Jim Jagielski [|] jim@jaguNET.com [|] > >> http://www.jaguNET.com/ > >> "A society that will trade a little liberty for a little order > >> will lose both and deserve neither" - T.Jefferson > >> > > > > >