BUG/MEDIUM: mux-h1: Report EOI when a TCP connection is upgraded to H2
When TCP connection is first upgrade to H1 then to H2, the stream-connector,
created by the PT mux, must be destroyed because the H2 mux cannot inherit
from it. When it is performed, the SE_FL_EOS flag is set but SE_FL_EOI must
also be set. It is now required to never set SE_FL_EOS without SE_FL_EOI or
SE_FL_ERROR.
It is a 2.8-specific issue. No backport needed.
diff --git a/src/mux_h1.c b/src/mux_h1.c
index 5115704..86dc754 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -2999,7 +2999,7 @@
h1c->flags |= H1C_F_UPG_H2C;
if (h1c->state == H1_CS_UPGRADING) {
BUG_ON(!h1s);
- se_fl_set(h1s->sd, SE_FL_EOS); /* Set EOS here to release the SC */
+ se_fl_set(h1s->sd, SE_FL_EOI|SE_FL_EOS); /* Set EOS here to release the SC */
}
TRACE_STATE("release h1c to perform H2 upgrade ", H1_EV_RX_DATA|H1_EV_H1C_WAKE);
goto release;
@@ -3156,7 +3156,7 @@
BUG_ON(!h1s);
if (h1c->flags & H1C_F_EOS) {
- se_fl_set(h1s->sd, SE_FL_EOS);
+ se_fl_set(h1s->sd, SE_FL_EOI|SE_FL_EOS);
TRACE_STATE("report EOS to SE", H1_EV_H1C_RECV, conn, h1s);
}
if (h1c->flags & (H1C_F_ERR_PENDING|H1C_F_ERROR)) {