From 47754eff45271d674fe6d347be82d6755195e8ce Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 17 Nov 2020 15:25:01 -0800 Subject: fixes #1355 wss4 and wss6 don't work as they should This also properly reenables the wssfile_test. --- src/supplemental/http/http_server.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/supplemental/http/http_server.c') diff --git a/src/supplemental/http/http_server.c b/src/supplemental/http/http_server.c index 46f2ce8a..6fad99c2 100644 --- a/src/supplemental/http/http_server.c +++ b/src/supplemental/http/http_server.c @@ -936,13 +936,17 @@ http_server_init(nni_http_server **serverp, const nni_url *url) } else if ((strcmp(url->u_scheme, "https") == 0) || (strcmp(url->u_scheme, "wss") == 0)) { myurl.u_scheme = "tls+tcp"; - } else if (strcmp(url->u_scheme, "ws4") == 0) { + } else if ((strcmp(url->u_scheme, "ws4") == 0) || + (strcmp(url->u_scheme, "http4")) == 0) { myurl.u_scheme = "tcp4"; - } else if (strcmp(url->u_scheme, "ws6") == 0) { + } else if ((strcmp(url->u_scheme, "ws6") == 0) || + (strcmp(url->u_scheme, "http6") == 0)) { myurl.u_scheme = "tcp6"; - } else if (strcmp(url->u_scheme, "wss4") == 0) { + } else if ((strcmp(url->u_scheme, "wss4") == 0) || + (strcmp(url->u_scheme, "https4") == 0)) { myurl.u_scheme = "tls+tcp4"; - } else if (strcmp(url->u_scheme, "wss6") == 0) { + } else if ((strcmp(url->u_scheme, "wss6") == 0) || + (strcmp(url->u_scheme, "https6") == 0)) { myurl.u_scheme = "tls+tcp6"; } else { return (NNG_EADDRINVAL); -- cgit v1.2.3-70-g09d2