]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h2: Don't add ":status" pseudo-header on trailers
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 18 Feb 2019 10:22:35 +0000 (11:22 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 18 Feb 2019 15:25:06 +0000 (16:25 +0100)
It is a cut-paste bug. Pseudo-header fields MUST NOT appear in trailers.

This patch must be backported to 1.9.

src/mux_h2.c

index 9b50f7ecab24f2f8e0a089e09edb11e8cf2dd1fe..62b8b00144c0911dab5681e85f2141c872017c1c 100644 (file)
@@ -4933,13 +4933,6 @@ static size_t h2s_htx_make_trailers(struct h2s *h2s, struct htx *htx)
        write_n32(outbuf.area + 5, h2s->id); // 4 bytes
        outbuf.data = 9;
 
-       /* encode status, which necessarily is the first one */
-       if (!hpack_encode_int_status(&outbuf, h2s->status)) {
-               if (b_space_wraps(&h2c->mbuf))
-                       goto realign_again;
-               goto full;
-       }
-
        /* encode all headers */
        for (idx = 0; idx < hdr; idx++) {
                /* these ones do not exist in H2 or must not appear in