You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by po...@apache.org on 2010/05/03 19:33:04 UTC
svn commit: r940526 - in /httpd/httpd/trunk: CHANGES support/ab.c
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 <brettg senseofsecurity.com>, Jeff Trawick]
+ *) ab: fix number of requests sent by ab when keepalive is enabled. PR 48497.
+ [Bryn Dole <dole blekko.com>]
+
*) 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);