]> git.kaiwu.me - haproxy.git/commitdiff
MEDIUM: mux-h2: Stop dealing with HTX flags transfer in h2_rcv_buf()
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 17 Mar 2026 18:08:54 +0000 (19:08 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 23 Mar 2026 13:02:43 +0000 (14:02 +0100)
In h2_rcv_buf(), HTX flags are transfer with data when htx_xfer() is
called. There is no reason to continue to deal with them in the H2 mux. In
addition, there is no reason to set SE_FL_EOI flag when a parsing error was
reported. This part was added before the stconn era. Nowadays, when an HTX
parsing error is reported, an error on the sedesc should also be reported.

src/mux_h2.c

index 4508b18596d02a4fd9dca69f97952d94900fa78a..113f6861275c707fa15375367ac8d870f7c358d1 100644 (file)
@@ -7902,15 +7902,6 @@ static size_t h2_rcv_buf(struct stconn *sc, struct buffer *buf, size_t count, in
 
        count -= htx_xfer(buf_htx, h2s_htx, count, HTX_XFER_DEFAULT);
 
-       if (h2s_htx->flags & HTX_FL_PARSING_ERROR) {
-               buf_htx->flags |= HTX_FL_PARSING_ERROR;
-               if (htx_is_empty(buf_htx))
-                       se_fl_set(h2s->sd, SE_FL_EOI);
-       }
-       else if (htx_is_empty(h2s_htx)) {
-               buf_htx->flags |= (h2s_htx->flags & HTX_FL_EOM);
-       }
-
        htx_to_buf(buf_htx, buf);
        htx_to_buf(h2s_htx, rxbuf);
        ret -= h2s_htx->data;