Przeglądaj źródła

Merge pull request #1298 from kstasik/fix/missing-host-name-for-websocket-with-ssl

fix: missing host name for ssl
bel2125 8 miesięcy temu
rodzic
commit
a8feabd222
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      src/civetweb.c

+ 3 - 0
src/civetweb.c

@@ -19538,6 +19538,9 @@ mg_connect_websocket_client(const char *host,
 	memset(&client_options, 0, sizeof(client_options));
 	client_options.host = host;
 	client_options.port = port;
+	if (use_ssl) {
+		client_options.host_name = host;
+	}
 
 	return mg_connect_websocket_client_impl(&client_options,
 	                                        use_ssl,