about summary refs log tree commit diff
path: root/util.c
Commit message (Collapse)AuthorAgeFilesLines
* move read_file_at to util.cLeah Neukirchen2024-06-071-0/+19
|
* Make `bbuf_get` result non-const, and add `bbuf_free`.Heikki Kallasjoki2018-12-231-1/+6
| | | | | | | | | | It's reasonable to want to modify the contents of the buffer in other ways than just plain appending, and the storage is already guaranteed contiguous. Drop the `const` from the `bbuf_get` return type, so it can be used to modify bytes in-place. The parallel request processing code may need to actually deallocate buffers as well, so add a `bbuf_free` function.
* Rename `cbuf` to `bbuf` in byte buffer utilities.Heikki Kallasjoki2018-12-221-16/+16
| | | | | The `cbuf_alloc` and `cbuf_free` functions conflict with the OpenWrt `libubox` library naming.
* Add support for matching with prefix in include/exclude lists.Heikki Kallasjoki2018-11-301-0/+16
|
* Add Apache License 2.0 headers and files.Heikki Kallasjoki2018-11-301-0/+16
|
* Bugfix: cbuf_cmp handled prefixes incorrectly.Heikki Kallasjoki2018-11-161-1/+7
| | | | | | | The previous version returned 0 if the string to compare was either equal to or a prefix of the target buffer. This change fixes it to only return 0 when the string is actually equal. Otherwise, it follows the shortlex ordering, for convenience.
* Add rudimentary (fake) HTTP server.Heikki Kallasjoki2018-11-161-0/+8
|
* Initial prototype.Heikki Kallasjoki2018-08-051-0/+197