ws: flags to opcodes should ignore CURLWS_CONT flag

When converting WebSocket flags such as CURLWS_TEXT | CURLWS_CONT we
want to exclude CURLWS_CONT from the lookup.

Closes #14397
This commit is contained in:
Pete Cordell 2024-08-05 15:30:15 +01:00 committed by Daniel Stenberg
parent b102763c19
commit 0011df47bc
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -560,7 +560,7 @@ static ssize_t ws_enc_write_head(struct Curl_easy *data,
return -1; return -1;
} }
opcode = ws_frame_flags2op((int)flags); opcode = ws_frame_flags2op((int)flags & ~CURLWS_CONT);
if(!opcode) { if(!opcode) {
failf(data, "WS: provided flags not recognized '%x'", flags); failf(data, "WS: provided flags not recognized '%x'", flags);
*err = CURLE_SEND_ERROR; *err = CURLE_SEND_ERROR;