When an error (400, 408, 500, 501) must be returned by the H1 multiplexer
and the proxy's error message is mapped on /dev/null or an empty file,
h1_send_error() exits without testing for embryonic H1 stream to destroy
it. So the H1 stream remains attached, preventing the H1 connection to be
closed as expected. The H1 connection is only released when the client
timeout expires.
Let's place the label before the embryonic stream destruction, so that it
is also performed for empty errors.
This was introduced by commit
0d4271cda ("BUG/MEDIUM: mux-h1: Properly
handle empty message when an error is triggered") in 3.1-dev7, which was
tagged for backport as far as 2.8. This must be backported where it was.
}
}
+ out_abort:
if (h1c->state == H1_CS_EMBRYONIC) {
BUG_ON(h1c->h1s == NULL || h1s_sc(h1c->h1s) != NULL);
TRACE_DEVEL("Abort embryonic H1S", H1_EV_H1C_ERR, h1c->conn, h1c->h1s);
h1s_destroy(h1c->h1s);
}
- out_abort:
h1c->flags = (h1c->flags & ~(H1C_F_WAIT_NEXT_REQ|H1C_F_ABRT_PENDING)) | H1C_F_ABRTED;
h1_close(h1c);
out: