mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-20 21:31:28 +02:00
MEDIUM: server: Make use of the stored ALPN stored in the server
Now that which ALPN gets negociated for a given server, use that to decide if we can create the mux right away in connect_server(), and use it in conn_install_mux_be(). That way, we may create the mux soon enough for early data to be sent, before the handshake has been completed. This commit depends on several previous commits, and it has not been deemed important enough to backport.
This commit is contained in:
parent
6a2b3269f9
commit
d4c51a4f57
@ -2057,7 +2057,8 @@ int connect_server(struct stream *s)
|
||||
* anyway.
|
||||
*/
|
||||
if (IS_HTX_STRM(s) && srv && srv->use_ssl &&
|
||||
(srv->ssl_ctx.alpn_str || srv->ssl_ctx.npn_str))
|
||||
(srv->ssl_ctx.alpn_str || srv->ssl_ctx.npn_str) &&
|
||||
srv->path_params.nego_alpn[0] == 0)
|
||||
may_start_mux_now = 0;
|
||||
#endif
|
||||
|
||||
|
@ -355,7 +355,12 @@ int conn_install_mux_be(struct connection *conn, void *ctx, struct session *sess
|
||||
int alpn_len = 0;
|
||||
int mode = conn_pr_mode_to_proto_mode(prx->mode);
|
||||
|
||||
conn_get_alpn(conn, &alpn_str, &alpn_len);
|
||||
if (!conn_get_alpn(conn, &alpn_str, &alpn_len)) {
|
||||
if (srv && srv->path_params.nego_alpn[0]) {
|
||||
alpn_str = srv->path_params.nego_alpn;
|
||||
alpn_len = strlen(alpn_str);
|
||||
}
|
||||
}
|
||||
mux_proto = ist2(alpn_str, alpn_len);
|
||||
|
||||
mux_ops = conn_get_best_mux(conn, mux_proto, PROTO_SIDE_BE, mode);
|
||||
|
Loading…
x
Reference in New Issue
Block a user