Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 21524 invoked from network); 3 May 2010 17:33:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 May 2010 17:33:56 -0000 Received: (qmail 49921 invoked by uid 500); 3 May 2010 17:33:56 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 49834 invoked by uid 500); 3 May 2010 17:33:55 -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 49827 invoked by uid 99); 3 May 2010 17:33:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 May 2010 17:33:55 +0000 X-ASF-Spam-Status: No, hits=-1350.8 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 May 2010 17:33:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4E9D123889B3; Mon, 3 May 2010 17:33:04 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r940526 - in /httpd/httpd/trunk: CHANGES support/ab.c Date: Mon, 03 May 2010 17:33:04 -0000 To: cvs@httpd.apache.org From: poirier@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100503173304.4E9D123889B3@eris.apache.org> Author: poirier Date: Mon May 3 17:33:03 2010 New Revision: 940526 URL: http://svn.apache.org/viewvc?rev=940526&view=rev Log: ab was sending wrong number of requests when keepalive enabled. Thanks to Bryn Dole for the patch. PR: 48497 Modified: httpd/httpd/trunk/CHANGES httpd/httpd/trunk/support/ab.c Modified: httpd/httpd/trunk/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=940526&r1=940525&r2=940526&view=diff ============================================================================== --- httpd/httpd/trunk/CHANGES [utf-8] (original) +++ httpd/httpd/trunk/CHANGES [utf-8] Mon May 3 17:33:03 2010 @@ -28,6 +28,9 @@ Changes with Apache 2.3.7 processing is completed, avoiding orphaned callback pointers. [Brett Gervasoni , Jeff Trawick] + *) ab: fix number of requests sent by ab when keepalive is enabled. PR 48497. + [Bryn Dole ] + *) Log an error for failures to read a chunk-size, and return 408 instead of 413 when this is due to a read timeout. This change also fixes some cases of two error documents being sent in the response for the same scenario. Modified: httpd/httpd/trunk/support/ab.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/ab.c?rev=940526&r1=940525&r2=940526&view=diff ============================================================================== --- httpd/httpd/trunk/support/ab.c (original) +++ httpd/httpd/trunk/support/ab.c Mon May 3 17:33:03 2010 @@ -671,6 +671,10 @@ static void ssl_proceed_handshake(struct static void write_request(struct connection * c) { + if (started >= requests) { + return; + } + do { apr_time_t tnow; apr_size_t l = c->rwrite; @@ -724,6 +728,7 @@ static void write_request(struct connect } while (c->rwrite); c->endwrite = lasttime = apr_time_now(); + started++; set_conn_state(c, STATE_READ); } @@ -1267,7 +1272,6 @@ static void start_connect(struct connect /* connected first time */ set_conn_state(c, STATE_CONNECTED); - started++; #ifdef USE_SSL if (c->ssl) { ssl_proceed_handshake(c); @@ -1798,7 +1802,6 @@ static void test(void) } else { set_conn_state(c, STATE_CONNECTED); - started++; #ifdef USE_SSL if (c->ssl) ssl_proceed_handshake(c);