mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-11 05:48:41 +00:00
BUG/MEDIUM: mux-fcgi: Never set SE_FL_EOS without SE_FL_EOI or SE_FL_ERROR
When end-of-stream is reported by a FCGI stream, we must take care to also report an error if 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
4cfb0019e6
commit
a272c39330
@ -3883,8 +3883,11 @@ static size_t fcgi_rcv_buf(struct stconn *sc, struct buffer *buf, size_t count,
|
||||
if (!(fstrm->h1m.flags & (H1_MF_VER_11|H1_MF_XFER_LEN)))
|
||||
se_fl_set(fstrm->sd, SE_FL_EOS);
|
||||
}
|
||||
if (fcgi_conn_read0_pending(fconn))
|
||||
if (fcgi_conn_read0_pending(fconn)) {
|
||||
se_fl_set(fstrm->sd, SE_FL_EOS);
|
||||
if (!se_fl_test(fstrm->sd, SE_FL_EOI))
|
||||
se_fl_set(fstrm->sd, SE_FL_ERROR);
|
||||
}
|
||||
if (se_fl_test(fstrm->sd, SE_FL_ERR_PENDING))
|
||||
se_fl_set(fstrm->sd, SE_FL_ERROR);
|
||||
fcgi_release_buf(fconn, &fstrm->rxbuf);
|
||||
|
Loading…
Reference in New Issue
Block a user