Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 88855 invoked from network); 20 Nov 2007 14:05:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Nov 2007 14:05:14 -0000 Received: (qmail 47138 invoked by uid 500); 20 Nov 2007 14:05:01 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 47089 invoked by uid 500); 20 Nov 2007 14:05:01 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 47075 invoked by uid 99); 20 Nov 2007 14:05:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Nov 2007 06:05:01 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Nov 2007 14:05:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6CA001A9832; Tue, 20 Nov 2007 06:04:50 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r596677 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/http/http_protocol.c Date: Tue, 20 Nov 2007 14:04:48 -0000 To: cvs@httpd.apache.org From: jim@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071120140450.6CA001A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jim Date: Tue Nov 20 06:04:47 2007 New Revision: 596677 URL: http://svn.apache.org/viewvc?rev=596677&view=rev Log: Merge r594839 from trunk: core: Avoid some unexpected connection closes by telling the client that the connection is not persistent if the MPM process handling the request is already exiting when the response header is built. Submitted by: trawick Reviewed by: jim Modified: httpd/httpd/branches/2.2.x/CHANGES httpd/httpd/branches/2.2.x/STATUS httpd/httpd/branches/2.2.x/modules/http/http_protocol.c Modified: httpd/httpd/branches/2.2.x/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=596677&r1=596676&r2=596677&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original) +++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Tue Nov 20 06:04:47 2007 @@ -1,6 +1,11 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.7 + *) core: Avoid some unexpected connection closes by telling the client + that the connection is not persistent if the MPM process handling + the request is already exiting when the response header is built. + [Jeff Trawick] + *) mod_autoindex: Generate valid XHTML output by adding the xhtml namespace. PR 43649 [Jose Kahan ] Modified: httpd/httpd/branches/2.2.x/STATUS URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=596677&r1=596676&r2=596677&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/STATUS (original) +++ httpd/httpd/branches/2.2.x/STATUS Tue Nov 20 06:04:47 2007 @@ -109,13 +109,6 @@ niq says: done jim: +1 - * core: Avoid some unexpected connection closes by telling the client - that the connection is not persistent if the MPM process handling - the request is already exiting when the response header is built. - trunk: http://svn.apache.org/viewvc?view=rev&revision=594839 - 2.2.x: trunk patch applies - +1: trawick, rpluem, jim - * mod_charset_lite cleanups to remove long-abandoned logic and fix some minor style problems trunk: Modified: httpd/httpd/branches/2.2.x/modules/http/http_protocol.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/http/http_protocol.c?rev=596677&r1=596676&r2=596677&view=diff ============================================================================== --- httpd/httpd/branches/2.2.x/modules/http/http_protocol.c (original) +++ httpd/httpd/branches/2.2.x/modules/http/http_protocol.c Tue Nov 20 06:04:47 2007 @@ -48,6 +48,7 @@ #include "util_charset.h" #include "util_ebcdic.h" #include "util_time.h" +#include "ap_mpm.h" #include "mod_core.h" @@ -187,6 +188,7 @@ * or they're a buggy twit coming through a HTTP/1.1 proxy * and the client is requesting an HTTP/1.0-style keep-alive * or the client claims to be HTTP/1.1 compliant (perhaps a proxy); + * and this MPM process is not already exiting * THEN we can be persistent, which requires more headers be output. * * Note that the condition evaluation order is extremely important. @@ -212,7 +214,8 @@ && (!apr_table_get(r->subprocess_env, "nokeepalive") || apr_table_get(r->headers_in, "Via")) && ((ka_sent = ap_find_token(r->pool, conn, "keep-alive")) - || (r->proto_num >= HTTP_VERSION(1,1)))) { + || (r->proto_num >= HTTP_VERSION(1,1))) + && !ap_graceful_stop_signalled()) { int left = r->server->keep_alive_max - r->connection->keepalives; r->connection->keepalive = AP_CONN_KEEPALIVE;