Software /
code /
prosody
Diff
net/websocket/frames.lua @ 11112:bcc701377fe4 0.11
net.websocket.frames: Additionally return partial frame if there is one
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 29 Sep 2020 13:58:32 +0100 |
parent | 11107:ddd0007e0f1b |
child | 11114:6a608ecb3471 |
child | 11157:413bd21ba449 |
line wrap: on
line diff
--- a/net/websocket/frames.lua Mon Sep 28 16:36:12 2020 +0100 +++ b/net/websocket/frames.lua Tue Sep 29 13:58:32 2020 +0100 @@ -141,7 +141,7 @@ local function parse_frame(frame) local result, pos = parse_frame_header(frame); - if result == nil or #frame < (pos + result.length) then return; end + if result == nil or #frame < (pos + result.length) then return nil, nil, result; end result.data = parse_frame_body(frame, result, pos+1); return result, pos + result.length; end