aboutsummaryrefslogtreecommitdiff
path: root/libweb
Commit message (Collapse)AuthorAgeFilesLines
* WIP bump libwebtest-multiformXavier Del Campo Romero2024-01-201-0/+0
|
* Bump libwebXavier Del Campo Romero2023-11-241-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | The following commit should increase performance for slcl: commit b0accd099fa8c5110d4c3c68830ad6fd810ca3ec Author: Xavier Del Campo Romero <xavi.dcr@tutanota.com> Date: Fri Nov 24 00:52:50 2023 +0100 http.c: Unify read operations So far, libweb would perform different read operations depending on its state: - For HTTP headers or request bodies, one byte at a time was read. - For multipart/form-data, up to BUFSIZ bytes at a time were read. However, this caused a significant extra number of syscalls for no reason and would increase code complexity, specially when parsing multiform/form-data boundaries. Now, http_read always reads up to BUFSIZ bytes at a time and process them on a loop. Apart from reducing code complexity, this should increase performance due to the (much) lower number of syscalls required.
* Upgrade to new libweb interfaceXavier Del Campo Romero2023-11-231-0/+0
| | | | | | | | | | | | | | | | | | | | | | | Recent commits from libweb brought a few breaking changes. The one below affected slcl, so it had to be updated according to the new interface: commit 98f5f52461b0c1ab1ee3331722bd32e2db9e1d41 Author: Xavier Del Campo <xavier.delcampo@midokura.com> Date: Thu Nov 16 12:23:08 2023 +0100 Split handler_loop from handler_listen Some applications might set up a struct handler object to listen on any port i.e., 0, but still need a way to determine which port number was eventually selected by the implementation. Therefore, handler_listen has been reduced to the server initialization bit, whereas the main loop has been split into its own function, namely handler_loop. Because of these changes, it no longer made sense for libweb to write the selected port to standard output, as this is something now applications can do on their own.
* Bump libwebXavier Del Campo Romero2023-11-121-0/+0
| | | | | | | | | | | | | | | | | | More bugfixes related to partial boundary parsing were provided by this commit: commit b71a6174e12b4709acaf8bc151938ba12d2a54f6 Author: Xavier Del Campo Romero <xavi.dcr@tutanota.com> Date: Sun Nov 12 23:31:57 2023 +0100 http.c: Fix more issues with partial boundaries - http_memmem must not check strlen(a) > n because, in case of a partial boundary, it would wrongfully return NULL. - If one or more characters from a partial boundary are found at the end of a buffer, but the next buffer does not start with the rest of the boundary, the accumulated boundary must be reset, and then look for a new boundary.
* Bump libwebXavier Del Campo Romero2023-11-121-0/+0
| | | | | | | | | | | | | | | | | | | Several bugfixes related to partial boundary parsing were provided by this commit: commit 7d02b225fe11fb0c7233cd2ea576485ee920f203 Author: Xavier Del Campo Romero <xavi.dcr@tutanota.com> Date: Sun Nov 12 06:16:26 2023 +0100 http.c: Fix several issues with partial boundaries - Writing to m->boundary[len] did not make any sense, as len is not meant to change between calls to read_mf_boundary_byte. - For the same reason, memset(3)ing "len + 1" did not make any sense. - When a partial boundary is found, http_memmem must still return st. - Calling reset_boundary with prev == 0 did not make sense, since that case typically means a partial boundary was found on a previous iteration, so m->blen must not be reset.
* libweb: Bump new signature for http_decode_urlXavier Del Campo Romero2023-11-121-0/+0
| | | | | | The new signature allows callers to distinguish decoding errors from fatal errors. This is important for slcl to avoid crashing when ill-formed data is received from a client.
* Bump libweb to v0.1.0-rc6Xavier Del Campo Romero2023-10-251-0/+0
|
* Bump libweb to v0.1.0-rc5Xavier Del Campo Romero2023-10-251-0/+0
|
* Apply slweb renaming to libwebXavier Del Campo Romero2023-10-111-0/+0