From ce753e3c3175d3d519ec8c346d9447b9cf719271 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 10 Sep 2022 17:13:44 +0200 Subject: [PATCH] setopt: make protocols2num() work with websockets So that CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR can specify those as well. Reported-by: Patrick Monnerat Bug: https://curl.se/mail/lib-2022-09/0016.html Closes #9467 --- lib/setopt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/setopt.c b/lib/setopt.c index afc44013c6..bfc7176437 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -185,6 +185,10 @@ static CURLcode protocol2num(char *str, curl_off_t *val) { "smtps", CURLPROTO_SMTPS }, { "telnet", CURLPROTO_TELNET }, { "tftp", CURLPROTO_TFTP }, +#ifdef USE_WEBSOCKETS + { "ws", CURLPROTO_WS }, + { "wss", CURLPROTO_WSS }, +#endif { NULL, 0 } }; -- 2.47.3