Matthew Wild <mwild1@gmail.com> [Tue, 29 Sep 2020 13:58:32 +0100] rev 11116
net.websocket.frames: Additionally return partial frame if there is one
Matthew Wild <mwild1@gmail.com> [Mon, 28 Sep 2020 16:36:12 +0100] rev 11115
mod_websocket: Continue to process data already in the buffer after an error occurs
Previously any error, or even a normal websocket close frame, would return early,
leaving potentially entire frames in the buffer unprocessed and then discarded.
This change stops processing new data, but returns an existing processed data up
to the point of the error/close.
Matthew Wild <mwild1@gmail.com> [Thu, 17 Sep 2020 16:42:36 +0100] rev 11114
mod_websocket: Enforce stanza size limit and close stream
Matthew Wild <mwild1@gmail.com> [Thu, 17 Sep 2020 16:42:14 +0100] rev 11113
mod_websocket: Add separate limit for frame buffer size
Matthew Wild <mwild1@gmail.com> [Thu, 17 Sep 2020 16:41:48 +0100] rev 11112
mod_websocket: handle full frame buffer and raise stream error
Matthew Wild <mwild1@gmail.com> [Thu, 17 Sep 2020 13:04:46 +0100] rev 11111
mod_websocket: Switch partial frame buffering to util.dbuffer
This improves performance and enforces stanza size limits earlier
in the pipeline.
Matthew Wild <mwild1@gmail.com> [Thu, 17 Sep 2020 13:00:19 +0100] rev 11110
net.websocket.frames: Allow all methods to work on non-string objects
Instead of using the string library, use methods from the passed object,
which are assumed to be equivalent.
This provides compatibility with objects from util.ringbuffer and
util.dbuffer, for example.
Kim Alvefur <zash@zash.se> [Mon, 24 Aug 2020 17:28:48 +0200] rev 11109
util.dbuffer: Simplify test case
An earlier theory involved the bug being related to collapsing multiple
items, so it exercised that too.
Also correct the comment, it referred to the space in "hello world" in
an earlier version before the test string was changed to "foobar", which
was what was tested in a REPL
Matthew Wild <mwild1@gmail.com> [Mon, 24 Aug 2020 16:18:13 +0100] rev 11108
util.dbuffer: Fix :sub() not working with partially-consumed chunks (thanks Zash for test case)
This also appears to fix some bugs with chunk-encoded streams in net.http.parser.
Matthew Wild <mwild1@gmail.com> [Fri, 26 Jun 2020 16:41:31 +0100] rev 11107
util.dbuffer: dynamic string buffer
Similar to util.ringbuffer (and shares almost identical API). Differences:
- size limit is optional and dynamic
- does not allocate a fixed buffer of max_size bytes
- focus on simply storing references to existing string objects where possible,
avoiding unnecessary allocations
- references are still stored in a ring buffer to enable use as a fast FIFO
Optional second parameter to new() provides the number of ring buffer segments. On
Lua 5.2 on my laptop, a segment is ~19 bytes. If the ring buffer fills up, the next
write will compact all strings into a single item.