]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h1: Be sure to update the count before adding EOM after trailers
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 3 Sep 2019 19:55:14 +0000 (21:55 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 4 Sep 2019 08:30:11 +0000 (10:30 +0200)
Otherwise, an EOM may be added in a full buffer.

This patch must be backported to 2.0.

src/mux_h1.c

index 90fb9e6f9c9ccb991b924d7825148b8ad11d2d41..647a44f8f1ac4253511d697c21cde4a1877e6f73 100644 (file)
@@ -1476,7 +1476,7 @@ static size_t h1_process_input(struct h1c *h1c, struct buffer *buf, size_t count
                                if (!ret)
                                        break;
                        }
-                       if (!h1_process_eom(h1s, h1m, htx, count))
+                       else if (!h1_process_eom(h1s, h1m, htx, count))
                                break;
                }
                else if (h1m->state == H1_MSG_DONE) {