mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-13 17:07:31 +00:00
MINOR: frontend: retrieve the ALPN name when available
Here we try to retrieve the negociated ALPN on the front connection. This will be used to decide whether or not we want to switch to H2.
This commit is contained in:
parent
8743f7e567
commit
0cfe3887de
@ -56,6 +56,14 @@ int frontend_accept(struct stream *s)
|
||||
struct connection *conn = objt_conn(sess->origin);
|
||||
struct listener *l = sess->listener;
|
||||
struct proxy *fe = sess->fe;
|
||||
const char *alpn_str = NULL;
|
||||
int alpn_len;
|
||||
|
||||
/* check if we're in HTTP mode, directly connected to the connection,
|
||||
* and with ALPN advertising H2.
|
||||
*/
|
||||
if (conn->owner == &s->si[0])
|
||||
conn_get_alpn(conn, &alpn_str, &alpn_len);
|
||||
|
||||
if ((fe->mode == PR_MODE_TCP || fe->mode == PR_MODE_HTTP)
|
||||
&& (!LIST_ISEMPTY(&fe->logsrvs))) {
|
||||
|
Loading…
Reference in New Issue
Block a user