aboutsummaryrefslogtreecommitdiffstats
path: root/util/dbuffer.lua
Commit message (Collapse)AuthorAgeFilesLines
* util: Prefix module imports with prosody namespaceKim Alvefur2023-03-171-1/+1
|
* util.dbuffer: Add efficient shortcuts for discard() in certain casesMatthew Wild2022-10-111-2/+6
| | | | | | If the buffer is already empty, nothing to do. If we're throwing away the whole buffer, we can just empty it and avoid read_chunk() (which in turn may collapse()). These shortcuts are much more efficient.
* util.dbuffer: Remove redundant code (read_chunk() cannot fail at this point)Matthew Wild2022-10-111-7/+3
|
* util.dbuffer: Fix bugs, remove multi-char support (more complex than first ↵Matthew Wild2021-06-291-3/+3
| | | | | | | | | thought) Character sequences could be split across chunk boundaries. Would require a bunch of code to make that work reliably. Only apply front_consumed on first chunk, and adjust buffer_pos accordingly.
* util.dbuffer: Add read_until() methodMatthew Wild2021-06-291-0/+14
|
* util.dbuffer: Add __name to metatableMatthew Wild2020-10-301-1/+1
|
* util.dbuffer: Optimize :sub() and :byte()Matthew Wild2020-10-281-4/+26
|
* util.dbuffer: Expose length as :len() method, like stringsKim Alvefur2020-10-121-0/+1
| | | | Ref #1598
* util.dbuffer: Fix :sub() not working with partially-consumed chunks (thanks ↵Matthew Wild2020-08-241-0/+176
Zash for test case) This also appears to fix some bugs with chunk-encoded streams in net.http.parser.