From 0504583316908806a24c975e9acb775a44d2c317 Mon Sep 17 00:00:00 2001 From: Florian Zeitz <florob@babelmonkeys.de> Date: Fri, 26 Sep 2014 22:12:21 +0200 Subject: net.websocket: Make data masking configurable --- net/websocket/frames.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/websocket') 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 -- cgit v1.2.3