BUG/MEDIUM: h2/hpack: fix emission of HPACK DTSU after settings change

Sadly, despite particular care, commit 39a0a1e12 ("MEDIUM: h2/hpack: emit
a Dynamic Table Size Update after settings change") broke H2 when sending
DTSU. A missing negation on the flag caused the DTSU_EMITTED flag to be
lost and the DTSU to be sent again on the next stream, and possibly to
break flow control or a few other internal states.

This will have to be backported wherever the patch above was backported.

Thanks to Yves Lafon for notifying us with elements to reproduce the
issue!
This commit is contained in:
Willy Tarreau 2022-02-16 14:28:14 +01:00
parent c382005636
commit c7d85485a0

View File

@ -5259,7 +5259,7 @@ static size_t h2s_frt_make_resp_headers(struct h2s *h2s, struct htx *htx)
if (h2c->flags & H2_CF_SHTS_UPDATED) {
/* was sent above */
h2c->flags |= H2_CF_DTSU_EMITTED;
h2c->flags &= H2_CF_SHTS_UPDATED;
h2c->flags &= ~H2_CF_SHTS_UPDATED;
}
if (es_now) {