From 86b664445d1bff47036d2fe53ca6e908d3d759f3 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 24 Jun 2026 17:14:23 +0200 Subject: [PATCH] BUG/MEDIUM: mux-spop: Truly drain outgoing data when the stream is closed After the H2 and the FCGI multiplexers, it is the third mux concerned by this issue. When we try to send data to the server and the stream is closed (in error, in half-closed state or fully closed), remaining data must be drained. This way the upper stream is able to properly handle the stream close. However, there was a bug here. The mux claimed to have consumed these data without draining them from the buffer. The issue was never reported on the SPOP multiplexer. But, in theory, the same than for the FCGI multiplexer is possible. This patch must be backported as far as 3.2. --- src/mux_spop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mux_spop.c b/src/mux_spop.c index 840fa3c9f..3a921ca4e 100644 --- a/src/mux_spop.c +++ b/src/mux_spop.c @@ -3427,6 +3427,7 @@ static size_t spop_snd_buf(struct stconn *sc, struct buffer *buf, size_t count, if (spop_strm->state >= SPOP_SS_HLOC) { /* trim any possibly pending data after we close */ + b_del(buf, count); total += count; count = 0; } -- 2.47.3