mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
Subject: [PATCH] Fix control messages are inflated
RFC7692 states that control messages should not be compressed so there is no need to inflate these messages. There can be a bug if a control message is received while processing a compressed message since lws relies on the RSV bit of the first message to inflate the rx buffer or not. Here we also check the opcode to only inflate a message if it is a data message. Fixes: #1470
This commit is contained in:
parent
613993300d
commit
4319ffe588
1 changed files with 1 additions and 1 deletions
|
@ -179,7 +179,7 @@ lws_extension_callback_pm_deflate(struct lws_context *context,
|
|||
case LWS_EXT_CB_PAYLOAD_RX:
|
||||
lwsl_ext(" %s: LWS_EXT_CB_PAYLOAD_RX: in %d, existing in %d\n",
|
||||
__func__, ebuf->len, priv->rx.avail_in);
|
||||
if (!(wsi->ws->rsv_first_msg & 0x40))
|
||||
if (!(wsi->ws->rsv_first_msg & 0x40) || (wsi->ws->opcode & 8))
|
||||
return 0;
|
||||
|
||||
// lwsl_hexdump_debug(ebuf->token, ebuf->len);
|
||||
|
|
Loading…
Add table
Reference in a new issue