From 8dbb1705fda5ce5e090738350c54d44c411d86ff Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 3 Jan 2019 08:52:09 +0100 Subject: [PATCH] BUG/MINOR: mux-h2: set the stream-full flag when leaving h2c_decode_headers() If we exit this function because some data are pending in the rxbuf, we currently don't indicate any blocking flag, which will prevent the operation from being attempted again. Let's set H2_CF_DEM_SFULL in this case to indicate there's not enough room in the stream buffer so that the operation may be attempted again once we make room. It seems that this issue cannot be triggered right now but it definitely will with trailers. This fix should be backported to 1.9 for completeness. --- src/mux_h2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mux_h2.c b/src/mux_h2.c index c159225573..cbfc8309c0 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -3314,11 +3314,15 @@ next_frame: if (h2c->proxy->options2 & PR_O2_USE_HTX) { htx = htx_from_buf(rxbuf); - if (!htx_is_empty(htx)) + if (!htx_is_empty(htx)) { + h2c->flags |= H2_CF_DEM_SFULL; goto fail; + } } else { - if (b_data(rxbuf)) + if (b_data(rxbuf)) { + h2c->flags |= H2_CF_DEM_SFULL; goto fail; + } rxbuf->head = 0; try = b_size(rxbuf); -- 2.47.3