mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
BUG/MEDIUM: h2: properly send an RST_STREAM on mux stream error
Some stream errors are detected on the MUX path (eg: H1 response encoding). The ones forgot to emit an RST_STREAM frame, causing the client to wait and/or to see the connection being immediately closed. This is now fixed.
This commit is contained in:
parent
6743420778
commit
c6795ca7c1
10
src/mux_h2.c
10
src/mux_h2.c
@ -2986,15 +2986,19 @@ static int h2_snd_buf(struct conn_stream *cs, struct buffer *buf, int flags)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* RST are sent similarly to frame acks */
|
||||||
|
if (h2s->st == H2_SS_ERROR) {
|
||||||
|
cs->flags |= CS_FL_ERROR;
|
||||||
|
if (h2c_send_rst_stream(h2s->h2c, h2s) > 0)
|
||||||
|
h2s->st = H2_SS_CLOSED;
|
||||||
|
}
|
||||||
|
|
||||||
if (h2s->flags & H2_SF_BLK_SFCTL) {
|
if (h2s->flags & H2_SF_BLK_SFCTL) {
|
||||||
/* stream flow control, quit the list */
|
/* stream flow control, quit the list */
|
||||||
LIST_DEL(&h2s->list);
|
LIST_DEL(&h2s->list);
|
||||||
LIST_INIT(&h2s->list);
|
LIST_INIT(&h2s->list);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (h2s->st == H2_SS_ERROR)
|
|
||||||
cs->flags |= CS_FL_ERROR;
|
|
||||||
|
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user