mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-27 15:12:11 +00:00
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.
This commit is contained in:
parent
ec4207cb68
commit
1baef1523d
@ -3356,7 +3356,7 @@ static size_t h1_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t coun
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (h1m->state != H1_MSG_DONE && !(h1c->wait_event.events & SUB_RETRY_RECV))
|
||||
if (((flags & CO_RFL_KEEP_RECV) || (h1m->state != H1_MSG_DONE)) && !(h1c->wait_event.events & SUB_RETRY_RECV))
|
||||
h1c->conn->xprt->subscribe(h1c->conn, h1c->conn->xprt_ctx, SUB_RETRY_RECV, &h1c->wait_event);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user