]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ws: flags to opcodes should ignore CURLWS_CONT flag
authorPete Cordell <pcordell@nevion.com>
Mon, 5 Aug 2024 14:30:15 +0000 (15:30 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 7 Aug 2024 07:06:30 +0000 (09:06 +0200)
When converting WebSocket flags such as CURLWS_TEXT | CURLWS_CONT we
want to exclude CURLWS_CONT from the lookup.

Closes #14397

lib/ws.c

index 3e8a4e818e50307b308fba08cf096c37054758fd..5854e5a5d3fb8c06aafb3ae1e309716de6da83e9 100644 (file)
--- a/lib/ws.c
+++ b/lib/ws.c
@@ -560,7 +560,7 @@ static ssize_t ws_enc_write_head(struct Curl_easy *data,
     return -1;
   }
 
-  opcode = ws_frame_flags2op((int)flags);
+  opcode = ws_frame_flags2op((int)flags & ~CURLWS_CONT);
   if(!opcode) {
     failf(data, "WS: provided flags not recognized '%x'", flags);
     *err = CURLE_SEND_ERROR;