mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-16 06:11:00 +01:00
BUG/MINOR: hq-interop: fix FIN transmission
Since the following patch, app_ops layer is now responsible to report that HTX block was the last transmitted so that FIN STREAM can be set. This is mandatory to properly support HTTP 1xx interim responses. f349df44b4e21d8bf9b575a0aa869056a2ebaa58 MINOR: qmux: change API for snd_buf FIN transmission This change was correctly implemented in HTTP/3 code, however an issue appeared on hq-interop transcoder in case zero-copy DATA transfer is performed when HTX buffer is swapped. If this occured during the transfer of the last HTX block, EOM is not detected and thus STREAM FIN is never set. Most of the times, QMUX shut callback is called immediately after. This results in an emission of a RESET_STREAM to the client, which prevents the data transfer. To fix this, use the same method as HTTP/3 : HTX EOM flag status is checked before any transfer, thus preserving it even after a zero-copy. Criticity of this bug is low as hq-interop is experimental and is mostly used for interop testing. This should fix github issue #3038. This patch must be backported wherever the above one is.
This commit is contained in:
parent
563b4fafc2
commit
b0fe453079
@ -171,10 +171,13 @@ static size_t hq_interop_snd_buf(struct qcs *qcs, struct buffer *buf,
|
||||
uint32_t bsize, fsize;
|
||||
struct buffer *res = NULL;
|
||||
size_t total = 0;
|
||||
char eom;
|
||||
int err;
|
||||
|
||||
*fin = 0;
|
||||
htx = htx_from_buf(buf);
|
||||
/* EOM is saved here, useful if 0-copy is performed with HTX buf. */
|
||||
eom = htx->flags & HTX_FL_EOM;
|
||||
|
||||
while (count && !htx_is_empty(htx) && qcc_stream_can_send(qcs)) {
|
||||
/* Not implemented : QUIC on backend side */
|
||||
@ -267,7 +270,7 @@ static size_t hq_interop_snd_buf(struct qcs *qcs, struct buffer *buf,
|
||||
}
|
||||
|
||||
end:
|
||||
if (htx->flags & HTX_FL_EOM && htx_is_empty(htx))
|
||||
if (eom && htx_is_empty(htx))
|
||||
*fin = 1;
|
||||
htx_to_buf(htx, buf);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user