mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-08 08:07:10 +02:00
BUG/MEDIUM: mux_h1: Process a new request if we already received it.
In h1_detach(), if our input buffer isn't empty, don't just subscribe(), we may hold a new request, and there's nothing left to read. Instead, call h1_process() directly, so that a new stream is created. Failure to do so means if we received the new request to early, the connecetion will just hang, as it happens when using svn.
This commit is contained in:
parent
3e128fe973
commit
69664419d2
@ -2491,7 +2491,11 @@ static void h1_detach(struct conn_stream *cs)
|
|||||||
h1_release(h1c);
|
h1_release(h1c);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
h1c->conn->xprt->subscribe(h1c->conn, h1c->conn->xprt_ctx, SUB_RETRY_RECV, &h1c->wait_event);
|
/* If we have a new request, process it immediately */
|
||||||
|
if (unlikely(b_data(&h1c->conn)))
|
||||||
|
h1_process(h1c);
|
||||||
|
else
|
||||||
|
h1c->conn->xprt->subscribe(h1c->conn, h1c->conn->xprt_ctx, SUB_RETRY_RECV, &h1c->wait_event);
|
||||||
if (h1c->task) {
|
if (h1c->task) {
|
||||||
h1c->task->expire = TICK_ETERNITY;
|
h1c->task->expire = TICK_ETERNITY;
|
||||||
if (b_data(&h1c->obuf)) {
|
if (b_data(&h1c->obuf)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user