]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http-ana: Don't report a server abort if response payload is invalid
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 17 Oct 2024 09:46:07 +0000 (11:46 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 17 Oct 2024 11:53:40 +0000 (13:53 +0200)
If a parsing error is reported by the mux on the response payload, a proxy
error (PRXCOND) must be reported instead of a server abort (SRVCL). Because
of this bug, inavlid response may are reported as "SD--" or "SL--" in logs
instead of "PD--" or "PL--".

This patch must be backported to all stable versions.

src/http_ana.c

index cc7fc70005754051c0d9931fd20f201e4d455d4a..a30100ffd6f313691e2a7e1973e16e78c0dad8ed 100644 (file)
@@ -2247,8 +2247,6 @@ int http_response_forward_body(struct stream *s, struct channel *res, int an_bit
                health_adjust(__objt_server(s->target), HANA_STATUS_HTTP_RSP);
        }
        stream_inc_http_fail_ctr(s);
-       if (!(s->flags & SF_ERR_MASK))
-               s->flags |= SF_ERR_SRVCL;
        /* fall through */
 
    return_error: