When using websockets, we may end up using a different ALPN than the one
we usually use with the server, so do not reuse the cached ALPN, if any,
and do not cache the one we used for that connection. Otherwise, we may
end up with websocket connections that will attempt to use the wrong
mux, and end in error.
Not making any attempt at caching the ALPN means we can't easily use
0RTT with websockets, but I do not believe this is a big problem.
This will hopefully help with github issue #3473.
This should be backported up to 3.3.
break;
}
- if (!conn_update_alpn(srv_conn, ist(alpn), force))
+ if (!conn_update_alpn(srv_conn, ist(alpn), force)) {
+ /*
+ * Possibly the ALPN will be different,
+ * so don't use any cached value.
+ */
+ may_start_mux_now = 0;
+ srv_conn->flags |= CO_FL_SSL_NO_CACHED_INFO;
DBG_TRACE_STATE("update alpn for websocket", STRM_EV_STRM_PROC|STRM_EV_CS_ST, s);
+ }
}
#endif
}