MINOR: mux-h2: Set H2_SF_ES_RCVD flag when decoding the HEADERS frame
The flag H2_SF_ES_RCVD is set on the H2 stream when the ES flag is found in
a frame. On HEADERS frame, it was set in function processing the frame. It
is moved in the function decoding the frame. Fundamentally, this changes
nothing. But it will be useful to have this information earlier when a
client H2 stream is created.
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 61dc972..587b98f 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -2801,9 +2801,6 @@
h2s->body_len = body_len;
done:
- if (h2c->dff & H2_F_HEADERS_END_STREAM)
- h2s->flags |= H2_SF_ES_RCVD;
-
if (h2s->flags & H2_SF_ES_RCVD) {
if (h2s->st == H2_SS_OPEN)
h2s->st = H2_SS_HREM;
@@ -2903,9 +2900,6 @@
goto fail;
}
- if (h2c->dff & H2_F_HEADERS_END_STREAM)
- h2s->flags |= H2_SF_ES_RCVD;
-
if (se_fl_test(h2s->sd, SE_FL_ERROR) && h2s->st < H2_SS_ERROR)
h2s->st = H2_SS_ERROR;
else if (h2s->flags & H2_SF_ES_RCVD) {
@@ -4961,6 +4955,7 @@
}
/* no more data are expected for this message */
htx->flags |= HTX_FL_EOM;
+ *flags |= H2_SF_ES_RCVD;
}
if (msgf & H2_MSGF_EXT_CONNECT)
@@ -5011,6 +5006,7 @@
TRACE_STATE("failed to append HTX trailers into rxbuf", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_H2S_ERR, h2c->conn);
goto fail;
}
+ *flags |= H2_SF_ES_RCVD;
goto done;
}