aboutsummaryrefslogtreecommitdiffstats
path: root/net/websocket/frames.lua
diff options
context:
space:
mode:
authorFlorian Zeitz <florob@babelmonkeys.de>2014-09-26 22:12:21 +0200
committerFlorian Zeitz <florob@babelmonkeys.de>2014-09-26 22:12:21 +0200
commit0504583316908806a24c975e9acb775a44d2c317 (patch)
treef831ddad5898ff1f96da6bf5d77647f5c1be1540 /net/websocket/frames.lua
parentb33b263b340740a6a98070899277bab8ada84968 (diff)
downloadprosody-0504583316908806a24c975e9acb775a44d2c317.tar.gz
prosody-0504583316908806a24c975e9acb775a44d2c317.zip
net.websocket: Make data masking configurable
Diffstat (limited to 'net/websocket/frames.lua')
-rw-r--r--net/websocket/frames.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/websocket/frames.lua b/net/websocket/frames.lua
index 8bbddd1c..fa0e130d 100644
--- a/net/websocket/frames.lua
+++ b/net/websocket/frames.lua
@@ -171,7 +171,7 @@ local function parse_close(data)
return code, message
end
-local function build_close(code, message)
+local function build_close(code, message, mask)
local data = pack_uint16be(code);
if message then
assert(#message<=123, "Close reason must be <=123 bytes");
@@ -180,7 +180,7 @@ local function build_close(code, message)
return build_frame({
opcode = 0x8;
FIN = true;
- MASK = true;
+ MASK = mask;
data = data;
});
end