summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Fritsch <sf@debian.org>2010-07-16 20:28:50 +0000
committerStefan Fritsch <sf@sfritsch.de>2012-01-02 10:37:09 +0100
commit4306859705654942370f17f602c6755591c6d1f3 (patch)
treeec53d4b1b10e655ccd52e878c6d2ce1ed06765fb
parente8269dbeb45558f36aa5345a96f12c83241a20e2 (diff)
downloadapache2-4306859705654942370f17f602c6755591c6d1f3.tar.gz
Fix ab sending more requests than specified by the -n parameter
git-svn-id: svn+ssh://svn.debian.org/svn/pkg-apache/trunk/apache2@1204 01b336ce-410b-0410-9a02-a0e7f243c266
-rw-r--r--debian/changelog2
-rw-r--r--debian/patches/00list1
-rwxr-xr-xdebian/patches/082_ab_num_requests.dpatch45
3 files changed, 48 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 046243db..7012ace2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ apache2 (2.2.15-6) UNRELEASED; urgency=low
for starting instead of calling apache2 directly. Closes: #580445
* Fix debug info to allow gdb loading it automatically. Closes: #581514
* Fix install target in Makefile created by apxs2 -n. Closes: #588787
+ * Fix ab sending more requests than specified by the -n parameter.
+ Closes: #541158
* Build as PIE, since gdb in squeeze now supports it.
* Update the postrm script to also purge the version of /var/www/index.html
introduced in 2.2.11-7.
diff --git a/debian/patches/00list b/debian/patches/00list
index f4b66235..4dbe324c 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -25,6 +25,7 @@
079_polish_translation.dpatch
080_mod_reqtimeout_fixes.dpatch
081_apxs_perl_5.12.dpatch
+082_ab_num_requests
099_config_guess_sub_update
200_cp_suexec.dpatch
201_build_suexec-custom.dpatch
diff --git a/debian/patches/082_ab_num_requests.dpatch b/debian/patches/082_ab_num_requests.dpatch
new file mode 100755
index 00000000..48172826
--- /dev/null
+++ b/debian/patches/082_ab_num_requests.dpatch
@@ -0,0 +1,45 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 082_ab_num_requests.dpatch by Stefan Fritsch <sf@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Upstream r940526, Debian bug #541158
+
+@DPATCH@
+diff -urNad trunk~/support/ab.c trunk/support/ab.c
+--- trunk~/support/ab.c 2010-07-16 22:17:41.697762479 +0200
++++ trunk/support/ab.c 2010-07-16 22:17:45.661763246 +0200
+@@ -628,6 +628,10 @@
+
+ static void write_request(struct connection * c)
+ {
++ if (started >= requests) {
++ return;
++ }
++
+ do {
+ apr_time_t tnow;
+ apr_size_t l = c->rwrite;
+@@ -690,6 +694,7 @@
+ new_pollfd.client_data = c;
+ apr_pollset_add(readbits, &new_pollfd);
+ }
++ started++;
+ }
+
+ /* --------------------------------------------------------- */
+@@ -1239,7 +1244,6 @@
+
+ /* connected first time */
+ c->state = STATE_CONNECTED;
+- started++;
+ #ifdef USE_SSL
+ if (c->ssl) {
+ ssl_proceed_handshake(c);
+@@ -1766,7 +1770,6 @@
+ }
+ else {
+ c->state = STATE_CONNECTED;
+- started++;
+ #ifdef USE_SSL
+ if (c->ssl)
+ ssl_proceed_handshake(c);