]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h1: report the correct frontend in error captures
authorWilly Tarreau <w@1wt.eu>
Tue, 18 Dec 2018 17:10:38 +0000 (18:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 18 Dec 2018 17:10:38 +0000 (18:10 +0100)
The error captures provided in HTX by the H1 mux would always report the
backend as the "other end". We need to assign the backend only on requests.

No backport is needed.

src/mux_h1.c

index 4e884ed8f37ea59742078fc5ab396570dd11b25a..af2ce7787792e9d256518d45dfa6c2a2c78a2923 100644 (file)
@@ -827,7 +827,7 @@ static void h1_capture_bad_message(struct h1c *h1c, struct h1s *h1s,
        struct proxy *other_end = sess->fe;
        union error_snapshot_ctx ctx;
 
-       if (h1s->cs->data)
+       if (h1s->cs->data && !(h1m->flags & H1_MF_RESP))
                other_end = si_strm(h1s->cs->data)->be;
 
        /* http-specific part now */