MINOR: mux-h1: Be sure EOM flag is set when processing end of outgoing message
When a message is sent, an extra check is performed when the parser is
switch to MSG_DONE state to be sure the EOM flag is really set. This flag is
quite new and replaces the EOM block. Thus, this test is a safeguard waiting
for a proper refactoring of the outgoing side.
diff --git a/src/mux_h1.c b/src/mux_h1.c
index d94ae54..4262b54 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -2218,6 +2218,11 @@
goto error; /* For now return an error */
done:
+ if (!(chn_htx->flags & HTX_FL_EOM)) {
+ TRACE_STATE("No EOM flags in done state", H1_EV_TX_DATA|H1_EV_H1C_ERR|H1_EV_H1S_ERR, h1c->conn, h1s);
+ goto error; /* For now return an error */
+ }
+
h1m->state = H1_MSG_DONE;
if (!(h1m->flags & H1_MF_RESP) && h1s->meth == HTTP_METH_CONNECT) {
h1c->flags |= H1C_F_WAIT_INPUT;