Software /
code /
prosody
Comparison
plugins/mod_websocket.lua @ 7314:e327e5b592f5
mod_websocket: Remove warning about unsolicited pong frames "MAY be sent unsolicited" per RFC 6455 (thanks mt)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 23 Mar 2016 14:31:35 +0100 |
parent | 7294:5f4d0753c818 |
child | 7315:4fd984d1e445 |
comparison
equal
deleted
inserted
replaced
7312:b4e99602ae75 | 7314:e327e5b592f5 |
---|---|
224 return; | 224 return; |
225 elseif opcode == 0x9 then -- Ping frame | 225 elseif opcode == 0x9 then -- Ping frame |
226 frame.opcode = 0xA; | 226 frame.opcode = 0xA; |
227 conn:write(build_frame(frame)); | 227 conn:write(build_frame(frame)); |
228 return ""; | 228 return ""; |
229 elseif opcode == 0xA then -- Pong frame | 229 elseif opcode == 0xA then -- Pong frame, MAY be sent unsolicited, eg as keepalive |
230 module:log("warn", "Received unexpected pong frame: " .. tostring(frame.data)); | |
231 return ""; | 230 return ""; |
232 else | 231 else |
233 log("warn", "Received frame with unsupported opcode %i", opcode); | 232 log("warn", "Received frame with unsupported opcode %i", opcode); |
234 return ""; | 233 return ""; |
235 end | 234 end |