mirror of
https://github.com/haproxy/haproxy.git
synced 2026-07-06 15:59:43 -04:00
BUG/MINOR: mux-quic: Fix handling EOM after in qcs_http_rcv_buf()
In qcs_http_rcv_buf() function, when the buffers cannot be swapped and htx_xfer() function is called, the way the EOM flag is handled is buggy. The htx_xfer() function is responsible to tranfer HTX flags from the QCS message to the CS one. And when it is performed, HTX flags of the original message are reset. So, the following test on the EOM flag when the QCS message is empty is never true. Because of this bug, QC_SF_EOI_SUSPENDED flag is never tested on this code path and <fin> variable is not set to 1 as expected. To fix the issue, we must test the EOM flag on the CS message. This patch must be backported to 3.4.
This commit is contained in:
parent
9aa081b17e
commit
e237b4ff9f
1 changed files with 2 additions and 3 deletions
|
|
@ -47,9 +47,8 @@ size_t qcs_http_rcv_buf(struct qcs *qcs, struct buffer *buf, size_t count,
|
|||
htx_xfer(cs_htx, qcs_htx, count, HTX_XFER_DEFAULT);
|
||||
BUG_ON(qcs_htx->flags & HTX_FL_PARSING_ERROR);
|
||||
|
||||
/* Copy EOM from src to dst buffer if all data copied. */
|
||||
if (htx_is_empty(qcs_htx) && (qcs_htx->flags & HTX_FL_EOM)) {
|
||||
cs_htx->flags |= HTX_FL_EOM;
|
||||
/* EOM was copied to cs_htx if all data were copied. */
|
||||
if (cs_htx->flags & HTX_FL_EOM) {
|
||||
if (!(qcs->flags & QC_SF_EOI_SUSPENDED))
|
||||
*fin = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue