summaryrefslogtreecommitdiff
path: root/src/plugins/relay/relay-websocket.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-02-04 18:54:56 +0100
committerSébastien Helleu <flashcode@flashtux.org>2024-02-04 18:54:56 +0100
commit5c6e6f43d112941e077c87777a773bfc070a180d (patch)
tree275da463965ffcac64f893c82d0274dcd7c6c840 /src/plugins/relay/relay-websocket.c
parent0414c139b0ddd0952677d265f372e61a05df3277 (diff)
downloadweechat-5c6e6f43d112941e077c87777a773bfc070a180d.zip
relay: disable "permessage-deflate" websocket extension when option relay.network.compression is set to 0
Diffstat (limited to 'src/plugins/relay/relay-websocket.c')
-rw-r--r--src/plugins/relay/relay-websocket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/relay/relay-websocket.c b/src/plugins/relay/relay-websocket.c
index 2d136620b..fa14abca1 100644
--- a/src/plugins/relay/relay-websocket.c
+++ b/src/plugins/relay/relay-websocket.c
@@ -301,7 +301,8 @@ relay_websocket_parse_extensions (const char *extensions,
{
params = weechat_string_split (exts[i], ";", " ", 0, 0, &num_params);
if (params && (num_params >= 1)
- && (strcmp (params[0], "permessage-deflate") == 0))
+ && (strcmp (params[0], "permessage-deflate") == 0)
+ && (weechat_config_integer (relay_config_network_compression) > 0))
{
ws_deflate->enabled = 1;
ws_deflate->server_context_takeover = 1;