]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
ab: Don't (doubly) count errors as err_length if not actually reading.
authorYann Ylavic <ylavic@apache.org>
Tue, 20 Jun 2023 15:11:25 +0000 (15:11 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 20 Jun 2023 15:11:25 +0000 (15:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910514 13f79535-47bb-0310-9956-ffa450edef68

support/ab.c

index 392a14e6d17f13c364a02e49994a56e0ac2ff5d8..7579052ed2a756d8499668ee70d4aedb59c217f4 100644 (file)
@@ -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++;