mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
BUG/MEDIUM: mux-h2: Never set SE_FL_EOS without SE_FL_EOI or SE_FL_ERROR
When end-of-stream is reported by a H2 stream, we must take care to also report an error is end-of-input was not reported. Indeed, it is now mandatory to set SE_FL_EOI or SE_FL_ERROR flags when SE_FL_EOS is set. It is a 2.8-specific issue. No backport needed.
This commit is contained in:
parent
c393c9e388
commit
c202c740b5
@ -6450,8 +6450,11 @@ static size_t h2_rcv_buf(struct stconn *sc, struct buffer *buf, size_t count, in
|
||||
if (h2s->flags & H2_SF_BODY_TUNNEL)
|
||||
se_fl_set(h2s->sd, SE_FL_EOS);
|
||||
}
|
||||
if (h2c_read0_pending(h2c) || h2s->st == H2_SS_CLOSED)
|
||||
if (h2c_read0_pending(h2c) || h2s->st == H2_SS_CLOSED) {
|
||||
se_fl_set(h2s->sd, SE_FL_EOS);
|
||||
if (!se_fl_test(h2s->sd, SE_FL_EOI))
|
||||
se_fl_set(h2s->sd, SE_FL_ERROR);
|
||||
}
|
||||
if (se_fl_test(h2s->sd, SE_FL_ERR_PENDING))
|
||||
se_fl_set(h2s->sd, SE_FL_ERROR);
|
||||
if (b_size(&h2s->rxbuf)) {
|
||||
|
Loading…
Reference in New Issue
Block a user