MINOR: mux-h1: Don't rely on the stream anymore in h1_set_srv_conn_mode()

In h1_set_srv_conn_mode(), we need to get the frontend proxy of a server
connection. untill now, we relied on the stream to get it. But it was a bit
dirty. The stream always exists at this stage but to get it, we also need to get
the stream-interface. Since the commit 7c6f8b146 ("MAJOR: connections: Detach
connections from streams."), the connection's owner is always the session, even
for outgoing connections. So now, we rely on the session to get the frontend
proxy in h1_set_srv_conn_mode().

Use the session instead of the stream to get
the frontend on the server connection
This commit is contained in:
Christopher Faulet 2018-11-22 10:19:50 +01:00 committed by Willy Tarreau
parent 870aad9116
commit a1692f51a5

View File

@ -594,8 +594,10 @@ static void h1_set_cli_conn_mode(struct h1s *h1s, struct h1m *h1m)
*/
static void h1_set_srv_conn_mode(struct h1s *h1s, struct h1m *h1m)
{
struct proxy *be = h1s->h1c->px;
struct proxy *fe = strm_fe(si_strm(h1s->cs->data));
struct h1c *h1c = h1s->h1c;
struct session *sess = h1c->conn->owner;
struct proxy *fe = sess->fe;
struct proxy *be = h1c->px;
int flag = H1S_F_WANT_KAL;
/* Tunnel mode can only by set on the frontend */