]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: H2: Make sure htx is set even on empty frames.
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 19 Dec 2018 14:53:53 +0000 (15:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Dec 2018 16:00:14 +0000 (17:00 +0100)
When transfering data, make sure htx is set even on empty frames, or we
will never add a HTX_BLK_EOM block.

src/mux_h2.c

index cec3576e29552bc9466747f84dc202428739ee07..fa7b26f23d22772ca92b82a49b77d26c79a3db4d 100644 (file)
@@ -3260,6 +3260,8 @@ static int h2_frt_transfer_data(struct h2s *h2s)
 
 try_again:
        flen = h2c->dfl - h2c->dpl;
+       if (h2c->proxy->options2 & PR_O2_USE_HTX)
+               htx = htx_from_buf(csbuf);
        if (!flen)
                goto end_transfer;
 
@@ -3270,7 +3272,6 @@ try_again:
        }
 
        if (h2c->proxy->options2 & PR_O2_USE_HTX) {
-               htx = htx_from_buf(csbuf);
                block1 = htx_free_data_space(htx);
                if (!block1) {
                        h2c->flags |= H2_CF_DEM_SFULL;