]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: h2: Don't try to chunk data when using HTX.
authorOlivier Houchard <cognet@ci0.org>
Fri, 7 Dec 2018 23:18:31 +0000 (00:18 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 8 Dec 2018 07:22:04 +0000 (08:22 +0100)
When we're using HTX, we don't have to generate chunk header/trailers, and
that ultimately leads to a crash when we try to access a buffer that
contains just chunk trailers.

This should not be backported.

src/mux_h2.c

index 2c8d1cc96597608a95379a1ecaf85a93db5aa88a..b0b891a0799b4e91580ad111002d402fc32e0478 100644 (file)
@@ -3101,7 +3101,7 @@ static int h2s_decode_headers(struct h2s *h2s)
                /* a payload is present */
                if (msgf & H2_MSGF_BODY_CL)
                        h2s->flags |= H2_SF_DATA_CLEN;
-               else if (!(msgf & H2_MSGF_BODY_TUNNEL))
+               else if (!(msgf & H2_MSGF_BODY_TUNNEL) && !htx)
                        h2s->flags |= H2_SF_DATA_CHNK;
        }