<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/libweb/include, branch async-response</title>
<subtitle>Small and lightweight web framework written in C99 and POSIX.1-2008.
</subtitle>
<id>https://gitea.privatedns.org/xavi/libweb/atom?h=async-response</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/libweb/atom?h=async-response'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/'/>
<updated>2025-09-24T08:56:19+00:00</updated>
<entry>
<title>WIP async response</title>
<updated>2025-09-24T08:56:19+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2025-09-23T20:03:57+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=cec24b0360d8a8a82ed2aa95362e958ec5f2fb0f'/>
<id>urn:sha1:cec24b0360d8a8a82ed2aa95362e958ec5f2fb0f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement HTTP byte serving</title>
<updated>2024-11-10T23:04:39+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2024-11-10T22:56:57+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=5d47b2d12caba33793a078d2eafae6ae3d2ad921'/>
<id>urn:sha1:5d47b2d12caba33793a078d2eafae6ae3d2ad921</id>
<content type='text'>
This commit allows the HTTP server to return partial content to clients,
rather than returning the whole resource. This can be particularly
useful for applications such as audio/video playback or showing large
PDF files.

Notes:

- Applications must not care about partial contents i.e., if a valid
user request was made, applications must still return HTTP status 200
("OK"), as usual. The HTTP server will then translate the status code to
206 ("Partial Content") if required.
</content>
</entry>
<entry>
<title>Move signal handling to processes</title>
<updated>2024-08-22T00:27:34+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2024-08-19T22:07:05+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=43e89fb23943b5ffb6854f290592c29cd079bf46'/>
<id>urn:sha1:43e89fb23943b5ffb6854f290592c29cd079bf46</id>
<content type='text'>
So far, libweb installed a signal handler so as to handle SIGTERM,
SIGPIPE and SIGINT signals so that processes would not have to care
about such details.

However, it is not advisable for libraries to install signal handlers,
as signals are handled on a per-process basis. The previous approach
would be incompatible if several instances of the library were allocated
by the same process.

Unfortunately, this has the undesired side effect of adding the
boilerplate code into the process.
</content>
</entry>
<entry>
<title>Limit maximum multipart/form-data pairs and files</title>
<updated>2024-02-19T22:00:56+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2024-02-19T22:00:56+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=afe0681c0b26bb64bad55d7e86770f346cfa043e'/>
<id>urn:sha1:afe0681c0b26bb64bad55d7e86770f346cfa043e</id>
<content type='text'>
A malicious user could inject an infinite number of empty files or
key/value pairs into a request in order to exhaust the device's
resources.
</content>
</entry>
<entry>
<title>http: Add support for PUT</title>
<updated>2023-11-20T15:34:24+00:00</updated>
<author>
<name>Xavier Del Campo</name>
<email>xavier.delcampo@midokura.com</email>
</author>
<published>2023-11-17T11:53:59+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=1755ee663cd67cd8d9adf9f06dd82b0477adab76'/>
<id>urn:sha1:1755ee663cd67cd8d9adf9f06dd82b0477adab76</id>
<content type='text'>
Notes:

- Since curl would use the "Expect: 100-continue" header field for PUT
operations, this was a good operation to fix the existing issues in its
implementation.

Breaking changes:

- expect_continue is no longer exclusive to struct http_post. Now, it
has been moved into struct http_payload and it is up to users to check
it.
</content>
</entry>
<entry>
<title>Split handler_loop from handler_listen</title>
<updated>2023-11-20T15:06:19+00:00</updated>
<author>
<name>Xavier Del Campo</name>
<email>xavier.delcampo@midokura.com</email>
</author>
<published>2023-11-16T11:23:08+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=98f5f52461b0c1ab1ee3331722bd32e2db9e1d41'/>
<id>urn:sha1:98f5f52461b0c1ab1ee3331722bd32e2db9e1d41</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Send HTTP headers to payload callback</title>
<updated>2023-11-18T00:03:12+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-11-17T23:56:04+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=65031ca3502e0c27780be847fd97c112546741a9'/>
<id>urn:sha1:65031ca3502e0c27780be847fd97c112546741a9</id>
<content type='text'>
Even if libweb already parses some common headers, such as
Content-Length, some users might find it interesting to inspect which
headers were received from a request.

Since HTTP/1.1 does not define a limit on the number of maximum headers
a client can send, for security reasons a maximum value must be provided
by the user. Any extra headers shall be then discarded by libweb.

An example application showing this new feature is also provided.
</content>
</entry>
<entry>
<title>http: Make http_decode_url return int</title>
<updated>2023-11-12T00:29:54+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-11-11T23:14:05+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=9ac68fd76c43523ea3aa3bcc4f9fef0ac2cee830'/>
<id>urn:sha1:9ac68fd76c43523ea3aa3bcc4f9fef0ac2cee830</id>
<content type='text'>
So far, it was not possible callers to distinguish between decoding
errors, as caused by ill-formed input, from fatal errors.
</content>
</entry>
<entry>
<title>Rename project from slweb to libweb</title>
<updated>2023-10-10T22:07:13+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-10-10T21:21:35+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=0222b75e8554796548e079aa3393c512ae30ac24'/>
<id>urn:sha1:0222b75e8554796548e079aa3393c512ae30ac24</id>
<content type='text'>
It was found out there was another project of the same name around
(https://git.sr.ht/~strahinja/slweb/), also related to website
generation.

In order to avoid confusion, a new name has been chosen for this
project. Surprisingly, libweb was not in use by any distributions
(according to https://repology.org and AUR index), and it should
reflect well the intention behind this project i.e., being a library
to build web-related stuff.
</content>
</entry>
<entry>
<title>http: Support HEAD</title>
<updated>2023-10-10T21:15:26+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-10-02T21:37:44+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=07e0063870725506447a0ad29a6b92bb8c8c4e0b'/>
<id>urn:sha1:07e0063870725506447a0ad29a6b92bb8c8c4e0b</id>
<content type='text'>
</content>
</entry>
</feed>
