<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/libweb, 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>http.c: Always set SameSite=Strict to cookies</title>
<updated>2025-09-23T14:28:44+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2025-09-23T14:28:44+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=f7864cb7d49a8ca5bddf8d1f68b71ecd5ed85adc'/>
<id>urn:sha1:f7864cb7d49a8ca5bddf8d1f68b71ecd5ed85adc</id>
<content type='text'>
This cookie attribute allows to mitigate CSRF attacks, while not
requiring the server to store additional data. [1]

[1]: https://owasp.org/www-community/SameSite
</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>http.c: Always call ctx_to_payload</title>
<updated>2024-10-04T13:16:52+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2024-10-04T13:16:52+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=b8cd00d00fa4dd2c45615c6b0367e3b57e12e98d'/>
<id>urn:sha1:b8cd00d00fa4dd2c45615c6b0367e3b57e12e98d</id>
<content type='text'>
Defining each struct http_payload manually had the risk of missing some
member on the initializer.

This was in fact the case for `n_headers` and `headers`, which were only
assigned by ctx_to_payload, and therefore some specific HTTP requests
would mistakenly not reflect such information to users.
</content>
</entry>
<entry>
<title>http.c: Avoid isspace(3) in get_boundary</title>
<updated>2024-10-04T13:15:16+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2024-10-04T13:15:16+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=ca70c2ae2217e20cebfe3b8a7aa967cba20e5b4f'/>
<id>urn:sha1:ca70c2ae2217e20cebfe3b8a7aa967cba20e5b4f</id>
<content type='text'>
According to POSIX.1-2008, this function is sensitive to the system
locale, which might then have different definitions for a whitespace
character.

Therefore, it is safer to only check against ' ' so as to remove such a
dependency.
</content>
</entry>
<entry>
<title>server.c: Fix wrong for loop range</title>
<updated>2024-08-28T01:52:59+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2024-08-28T01:27:28+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=872bfc2f8faf2000703f26ebb88a68ab0f356a7d'/>
<id>urn:sha1:872bfc2f8faf2000703f26ebb88a68ab0f356a7d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>server.c: Multiplex client events</title>
<updated>2024-08-25T13:10:11+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2024-08-25T12:46:06+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=1eaab0bd503d4ca6d1b62082a0117447171d1bc8'/>
<id>urn:sha1:1eaab0bd503d4ca6d1b62082a0117447171d1bc8</id>
<content type='text'>
Future commits would allow user-defined callbacks to write zero, one or
more bytes to a file descriptor. If zero bytes were written, server_poll
must avoid to always point to the same server_client, so that other
requests from other server_client instances can still be handled.
</content>
</entry>
<entry>
<title>server.c: Fix descriptor leak on failed fcntl(2)</title>
<updated>2024-08-25T12:32:27+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2024-08-25T12:32:27+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=199d801c835e95b54908b1a34963f65ba6ceee30'/>
<id>urn:sha1:199d801c835e95b54908b1a34963f65ba6ceee30</id>
<content type='text'>
</content>
</entry>
<entry>
<title>handler.c: Do not printf when exiting</title>
<updated>2024-08-25T12:31:21+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2024-08-25T12:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=43a39a1f2e5e6c7c520f03293fc57aa76fea8aaf'/>
<id>urn:sha1:43a39a1f2e5e6c7c520f03293fc57aa76fea8aaf</id>
<content type='text'>
libweb is meant to be silent during normal operation, thus only printing
to stderr on errors.
</content>
</entry>
<entry>
<title>Bump version to 0.4.0</title>
<updated>2024-08-22T00:27:35+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2024-08-22T00:04:29+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=93571556ee97e1a3e1829f8bc708d1d63f188840'/>
<id>urn:sha1:93571556ee97e1a3e1829f8bc708d1d63f188840</id>
<content type='text'>
</content>
</entry>
</feed>
