aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-04-08 19:49:45 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-04-08 19:49:45 +0200
commitfd4177157e865fe025ebbbe63a6a3d179f348cd4 (patch)
tree43e0e853840cef94c9de8d2831cd4f7a60f1b6aa
parent01757df58fcec75f991a8cbce64d7c1b81ca325e (diff)
downloadjson-rpc-shell-fd4177157e865fe025ebbbe63a6a3d179f348cd4.tar.gz
json-rpc-shell-fd4177157e865fe025ebbbe63a6a3d179f348cd4.tar.xz
json-rpc-shell-fd4177157e865fe025ebbbe63a6a3d179f348cd4.zip
Fix WS masking logic
-rw-r--r--json-rpc-shell.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/json-rpc-shell.c b/json-rpc-shell.c
index 10b3dd5..de42923 100644
--- a/json-rpc-shell.c
+++ b/json-rpc-shell.c
@@ -1115,7 +1115,7 @@ backend_ws_on_frame_header (void *user_data, const struct ws_parser *parser)
// connection when the frame is unmasked
if (parser->reserved_1 || parser->reserved_2 || parser->reserved_3
- || !parser->is_masked // client -> server payload must be masked
+ || parser->is_masked // server -> client payload must not be masked
|| (ws_is_control_frame (parser->opcode) &&
(!parser->is_fin || parser->payload_len > WS_MAX_CONTROL_PAYLOAD_LEN))
|| (!ws_is_control_frame (parser->opcode) &&