plugins/mod_websocket.lua
branch0.11
changeset 10585 10d6d0d91f4e
parent 10096 4b3c129e96f2
child 10586 6d4562acef81
child 10620 37936c72846d
equal deleted inserted replaced
10582:419ac5ef2d3d 10585:10d6d0d91f4e
   234 		elseif opcode == 0x8 then -- Close request
   234 		elseif opcode == 0x8 then -- Close request
   235 			websocket_close(1000, "Goodbye");
   235 			websocket_close(1000, "Goodbye");
   236 			return;
   236 			return;
   237 		elseif opcode == 0x9 then -- Ping frame
   237 		elseif opcode == 0x9 then -- Ping frame
   238 			frame.opcode = 0xA;
   238 			frame.opcode = 0xA;
       
   239 			frame.MASK = false; -- Clients send masked frames, servers don't, see #1484
   239 			conn:write(build_frame(frame));
   240 			conn:write(build_frame(frame));
   240 			return "";
   241 			return "";
   241 		elseif opcode == 0xA then -- Pong frame, MAY be sent unsolicited, eg as keepalive
   242 		elseif opcode == 0xA then -- Pong frame, MAY be sent unsolicited, eg as keepalive
   242 			return "";
   243 			return "";
   243 		else
   244 		else