BUG/MEDIUM: mux-h2: Never set SE_FL_EOS without SE_FL_EOI or SE_FL_ERROR
When end-of-stream is reported by a H2 stream, we must take care to also
report an error is end-of-input was not reported. Indeed, it is now
mandatory to set SE_FL_EOI or SE_FL_ERROR flags when SE_FL_EOS is set.
It is a 2.8-specific issue. No backport needed.
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 7c553ad..2f06db8 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -6450,8 +6450,11 @@
if (h2s->flags & H2_SF_BODY_TUNNEL)
se_fl_set(h2s->sd, SE_FL_EOS);
}
- if (h2c_read0_pending(h2c) || h2s->st == H2_SS_CLOSED)
+ if (h2c_read0_pending(h2c) || h2s->st == H2_SS_CLOSED) {
se_fl_set(h2s->sd, SE_FL_EOS);
+ if (!se_fl_test(h2s->sd, SE_FL_EOI))
+ se_fl_set(h2s->sd, SE_FL_ERROR);
+ }
if (se_fl_test(h2s->sd, SE_FL_ERR_PENDING))
se_fl_set(h2s->sd, SE_FL_ERROR);
if (b_size(&h2s->rxbuf)) {