BUG/MINOR: mux-h2: Also expect data when waiting for a tunnel establishment

When a client H2 stream is waiting for a tunnel establishment, it must state
it expects data from server. It is the second fix that should fix
regressions of the commit 2722c04b ("MEDIUM: mux-h2: Don't expect data from
server as long as request is unfinished")

It is a 2.8-specific bug. No backport needed.
This commit is contained in:
Christopher Faulet 2023-05-04 16:41:37 +02:00
parent cb01f5daa7
commit 34f81d5815

View File

@ -1563,7 +1563,7 @@ static struct h2s *h2c_frt_stream_new(struct h2c *h2c, int id, struct buffer *in
/* The request is not finished, don't expect data from the opposite side
* yet
*/
if (!(h2c->dff & (H2_F_HEADERS_END_STREAM| H2_F_DATA_END_STREAM)))
if (!(h2c->dff & (H2_F_HEADERS_END_STREAM| H2_F_DATA_END_STREAM|H2_SF_BODY_TUNNEL)))
se_expect_no_data(h2s->sd);
/* FIXME wrong analogy between ext-connect and websocket, this need to
@ -6466,7 +6466,7 @@ static size_t h2_rcv_buf(struct stconn *sc, struct buffer *buf, size_t count, in
if (b_data(&h2s->rxbuf))
se_fl_set(h2s->sd, SE_FL_RCV_MORE | SE_FL_WANT_ROOM);
else {
if (!(h2c->flags & H2_CF_IS_BACK) && (h2s->flags & H2_SF_ES_RCVD)) {
if (!(h2c->flags & H2_CF_IS_BACK) && (h2s->flags & (H2_SF_BODY_TUNNEL|H2_SF_ES_RCVD))) {
/* If request ES is reported to the upper layer, it means the
* H2S now expects data from the opposite side.
*/