MEDIUM: session: use the ALPN token and proxy mode to select the mux

When an incoming connection is made on an HTTP mode frontend, the
session now looks up the mux to use based on the ALPN token and the
proxy mode. This will allow easier mux registration, and we don't
need to hard-code the mux_pt_ops anymore.
This commit is contained in:
Willy Tarreau
2017-09-15 06:59:55 +02:00
parent f64908294c
commit 2e0b2b5f83
2 changed files with 5 additions and 6 deletions

View File

@@ -21,7 +21,6 @@
#include <proto/connection.h>
#include <proto/listener.h>
#include <proto/log.h>
#include <proto/mux_pt.h>
#include <proto/proto_http.h>
#include <proto/proxy.h>
#include <proto/session.h>
@@ -407,7 +406,7 @@ static int conn_complete_session(struct connection *conn)
goto fail;
session_count_new(sess);
if (conn_install_mux(conn, &mux_pt_ops, NULL) < 0)
if (conn_install_best_mux(conn, sess->fe->mode == PR_MODE_HTTP, NULL) < 0)
goto fail;
/* the embryonic session's task is not needed anymore */