]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http-ana: Fix wrong client abort reports during responses forwarding
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 24 Oct 2024 09:58:46 +0000 (11:58 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 24 Oct 2024 10:07:50 +0000 (12:07 +0200)
When the response forwarding is aborted, we must not report a client abort
if a EOS was seen on client side. On abort performed by the stream must be
considered.

This bug was introduced when the SHUTR was splitted in 2 flags.

This patch must be backported as far as 2.8.

src/http_ana.c

index d94ca18f4b48e3aca3d916bd2d337569c4a1860a..3b1bdda40378ab3540e8608c7fedf837a83181ff 100644 (file)
@@ -2185,7 +2185,7 @@ int http_response_forward_body(struct stream *s, struct channel *res, int an_bit
         * server abort.
         */
        if (msg->msg_state < HTTP_MSG_ENDING && (s->scb->flags & (SC_FL_EOS|SC_FL_ABRT_DONE))) {
-               if ((s->scf->flags & (SC_FL_EOS|SC_FL_ABRT_DONE)) &&
+               if ((s->scf->flags & SC_FL_ABRT_DONE) &&
                    (s->scb->flags & SC_FL_SHUT_DONE)) {
                        COUNT_IF(1, "Client abort during response forwarding");
                        goto return_cli_abort;