]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mux-h1: Fix condition to set EOI on SE during zero-copy forwarding
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 2 Oct 2024 07:25:28 +0000 (09:25 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 2 Oct 2024 08:22:51 +0000 (10:22 +0200)
commit6b39e245e1d58698310fbb06b8122423232be9a4
treebf2b693c3fbe3167f9b668c0e97102671f1db3af
parent27ee2927313aee25f83cf4173ccf2c4e14d58738
BUG/MINOR: mux-h1: Fix condition to set EOI on SE during zero-copy forwarding

During zero-copy data forwarding, the producer must set the EOI flag on the SE
when end of the message is reached. It is already done but there is a case where
this flag is set while it should not. When a request wants to perform a protocol
upgrade and it is waiting for the server response, the flag must not be set
because the HTTP message is finished but some data are possibly still expected,
depending on the server response. On a 101-switching-protocol, more data will be
sent because the producer is switch to TUNNEL state.

So, now, the right condition is used. In DONE state, SE_FL_EOI flag is set on the sedesc iff:

  - it is the response
  - it is the request and the response is also in DONNE state
  - it is a request but no a protocol upgrade nor a CONNECT

This patch must be backported as far as 2.9.
src/mux_h1.c