From: Willy Tarreau Date: Thu, 3 Jan 2019 07:52:09 +0000 (+0100) Subject: BUG/MINOR: mux-h2: set the stream-full flag when leaving h2c_decode_headers() X-Git-Tag: v2.0-dev1~298 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8dbb1705fda5ce5e090738350c54d44c411d86ff;p=thirdparty%2Fhaproxy.git 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. --- 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);