1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

http: redir: to tls from none

This commit is contained in:
Andy Green 2021-07-27 11:08:08 +01:00
parent fac7c5bf9c
commit d18d7a3643

View file

@ -1626,12 +1626,16 @@ lws_client_reset(struct lws **pwsi, int ssl, const char *address, int port,
wsi->flags = (wsi->flags & (~LCCSCF_USE_SSL)) |
(ssl ? LCCSCF_USE_SSL : 0);
if (!cisin[CIS_ALPN] || !cisin[CIS_ALPN][0])
#if defined(LWS_ROLE_H2)
cisin[CIS_ALPN] = "h2,http/1.1";
#else
cisin[CIS_ALPN] = "http/1.1";
#endif
lwsl_notice("%s: REDIRECT %s:%d, path='%s', ssl = %d, alpn='%s'\n",
__func__, address, port, path, ssl, cisin[CIS_ALPN]);
if (!cisin[CIS_ALPN][0])
assert(0);
lws_pt_lock(pt, __func__);
__remove_wsi_socket_from_fds(wsi);
lws_pt_unlock(pt);