mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-08 08:07:10 +02:00
MEDIUM: mux-h1: Don't block reads when waiting for the other side
When we are waiting for the other side to read more data, or to read the next request, we must only stop the processing of input data and not the data receipt. This patch don't change anything on the subscribes for reads. So it should not change anything. The only difference is that the H1 connection will try to read data if it is woken up for an I/O event and if it was subscribed for reads. This patch is required to fix abortonclose option for H1 client connections.
This commit is contained in:
parent
d8219b31e7
commit
ec4207cb68
@ -393,11 +393,6 @@ static inline int h1_recv_allowed(const struct h1c *h1c)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (h1c->flags & H1C_F_WAIT_OUTPUT) {
|
|
||||||
TRACE_DEVEL("recv not allowed (wait_output)", H1_EV_H1C_RECV|H1_EV_H1C_BLK, h1c->conn);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(h1c->flags & (H1C_F_IN_ALLOC|H1C_F_IN_FULL|H1C_F_IN_SALLOC)))
|
if (!(h1c->flags & (H1C_F_IN_ALLOC|H1C_F_IN_FULL|H1C_F_IN_SALLOC)))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
@ -1538,7 +1533,7 @@ static size_t h1_process_input(struct h1c *h1c, struct buffer *buf, size_t count
|
|||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
if (h1c->flags & H1C_F_WAIT_OUTPUT)
|
if (h1c->flags & H1C_F_WAIT_OUTPUT)
|
||||||
goto end;
|
goto out;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
size_t used = htx_used_space(htx);
|
size_t used = htx_used_space(htx);
|
||||||
@ -1698,6 +1693,7 @@ static size_t h1_process_input(struct h1c *h1c, struct buffer *buf, size_t count
|
|||||||
((h1m->state == H1_MSG_DONE) && (h1s->meth != HTTP_METH_CONNECT) && !(h1m->flags & H1_MF_CONN_UPG)))
|
((h1m->state == H1_MSG_DONE) && (h1s->meth != HTTP_METH_CONNECT) && !(h1m->flags & H1_MF_CONN_UPG)))
|
||||||
h1s->cs->flags |= CS_FL_EOI;
|
h1s->cs->flags |= CS_FL_EOI;
|
||||||
|
|
||||||
|
out:
|
||||||
if (h1s_data_pending(h1s) && !htx_is_empty(htx))
|
if (h1s_data_pending(h1s) && !htx_is_empty(htx))
|
||||||
h1s->cs->flags |= CS_FL_RCV_MORE | CS_FL_WANT_ROOM;
|
h1s->cs->flags |= CS_FL_RCV_MORE | CS_FL_WANT_ROOM;
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user