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.
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);