summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2023-06-20 17:11:25 +0200
committerYann Ylavic <ylavic@apache.org>2023-06-20 17:11:25 +0200
commit5e82b94b07ebb78055ad070501b3b11d89e42108 (patch)
treeaf3d7feccf1668c41a673ee69aa75fd1028fbc7d /support
parentab: Fix crash with -W when exiting earlya on fatal error. (diff)
downloadapache2-5e82b94b07ebb78055ad070501b3b11d89e42108.tar.xz
apache2-5e82b94b07ebb78055ad070501b3b11d89e42108.zip
ab: Don't (doubly) count errors as err_length if not actually reading.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910514 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support')
-rw-r--r--support/ab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/support/ab.c b/support/ab.c
index 392a14e6d1..7579052ed2 100644
--- a/support/ab.c
+++ b/support/ab.c
@@ -1810,7 +1810,8 @@ static void finalize_connection(struct connection *c, int reuse)
worker->metrics.good++;
}
else {
- if (!nolength && c->bread != worker->metrics.doclen) {
+ if (c->state >= STATE_READ
+ && !nolength && c->bread != worker->metrics.doclen) {
worker->metrics.err_length++;
}
worker->metrics.bad++;