BUG/MEDIUM: mux-h1: Properly report client close if abortonclose option is set
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 8 Apr 2021 16:42:59 +0000 (18:42 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 25 May 2021 08:37:22 +0000 (10:37 +0200)
commit10631d94b6bd1814f87d81ce99003d49583ecd85
tree7cfaa2fca36a4d75fe8b6df86051ee46d570896f
parent655205413a779da086def0365d7a567cf37c2642
BUG/MEDIUM: mux-h1: Properly report client close if abortonclose option is set

On client side, if CO_RFL_KEEP_RECV flags is set when h1_rcv_buf() is
called, we force subscription for reads to be able to catch read0. This way,
the event will be reported to upper layer to let the stream abort the
request.

This patch fixes the abortonclose option for H1 connections. It depends on
following patches :

  * MEDIUM: mux-h1: Don't block reads when waiting for the other side
  * MINOR: conn-stream: Force mux to wait for read events if abortonclose is set

But to be sure the event is handled by the stream, the following patches are
also required :

  * BUG/MINOR: stream-int: Don't block reads in si_update_rx() if chn may receive
  * MINOR: channel: Rely on HTX version if appropriate in channel_may_recv()

All the series must be backported with caution as far as 2.0, and only after
a period of observation to be sure nothing broke.

(cherry picked from commit 1baef1523d1be1b6edf76c78688af932d4d36d8a)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/mux_h1.c