<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/libweb/include, branch master</title>
<subtitle>Small and lightweight web framework written in C99 and POSIX.1-2008.
</subtitle>
<id>https://gitea.privatedns.org/xavi/libweb/atom?h=master</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/libweb/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/'/>
<updated>2026-02-27T15:29:06+00:00</updated>
<entry>
<title>Add http_strcasecmp(3)</title>
<updated>2026-02-27T15:29:06+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2026-02-27T14:28:17+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=6353beb60ceafbc743bde96684d666582195192f'/>
<id>urn:sha1:6353beb60ceafbc743bde96684d666582195192f</id>
<content type='text'>
POSIX.1-2008 does not any locale-specific version of strcasecmp(3), so
conversions to lowercase depend on the system locale.

Since HTTP header fields must be checked without case sensitivity and
not depend on the system locale, a specialised function that forces the
"POSIX" locale is required.
</content>
</entry>
<entry>
<title>Add http_strncasecmp(3)</title>
<updated>2026-02-27T15:28:52+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2026-02-27T11:30:45+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=d783e794c2fa6a9e6bffff9f41cdb7e8033bf3c3'/>
<id>urn:sha1:d783e794c2fa6a9e6bffff9f41cdb7e8033bf3c3</id>
<content type='text'>
POSIX.1-2008 does not any locale-specific version of strncasecmp(3), so
conversions to lowercase depend on the system locale.

Since HTTP header fields must be checked without case sensitivity and
not depend on the system locale, a specialised function that forces the
"POSIX" locale is required.
</content>
</entry>
<entry>
<title>Add HTTP op and resource to length callback</title>
<updated>2026-02-12T15:59:55+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2026-02-12T15:59:55+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=87807c690947f4636dc4dd7fddca15f944719f0c'/>
<id>urn:sha1:87807c690947f4636dc4dd7fddca15f944719f0c</id>
<content type='text'>
Users might want to know which HTTP operation (i.e., POST or PUT) and/or
resource is being requested before determining whether the request
should be accepted or not.
</content>
</entry>
<entry>
<title>Add optional expiration date to http_cookie_create</title>
<updated>2026-02-12T15:10:37+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2026-02-12T14:55:13+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=1b2a52d214d92f543c9e0651f56c3292b23655a5'/>
<id>urn:sha1:1b2a52d214d92f543c9e0651f56c3292b23655a5</id>
<content type='text'>
So far, libweb had been arbitrarily appending a 1-year expiration date
to all HTTP cookies. While good enough for some contexts, libweb should
allow users to set up their own, if any, so this arbitary decision has
been eventually removed.
</content>
</entry>
<entry>
<title>Implement HTTP chunk encoding</title>
<updated>2025-10-07T23:57:42+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2025-10-06T21:01:42+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=e77bd93693a74ce872d4c13fb45537c34518d84f'/>
<id>urn:sha1:e77bd93693a74ce872d4c13fb45537c34518d84f</id>
<content type='text'>
A new function pointer, namely chunk, has been added to struct
http_response so that library users can generate their message bodies
dynamically.
</content>
</entry>
<entry>
<title>Allow custom backlog connections</title>
<updated>2025-10-06T19:03:59+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2025-10-06T19:03:59+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=db9cb051c4ee05c07ab32dfed5bae8b7dc0916bd'/>
<id>urn:sha1:db9cb051c4ee05c07ab32dfed5bae8b7dc0916bd</id>
<content type='text'>
libweb calls listen(2) when setting up the HTTP server, and its backlog
argument was hardcoded to 10. While probably not an issue for some
applications, it can be too limiting for some others.

Therefore, it is desirable to allow library users to set up their own
limits. Otherwise, 10 is still chosen as a sane default.
</content>
</entry>
<entry>
<title>Fix design issues with async responses, add async example</title>
<updated>2025-10-06T13:51:00+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2025-10-05T23:23:20+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=3e4c7c993bbbe2bdeb563fa888b900d01c4be4a1'/>
<id>urn:sha1:3e4c7c993bbbe2bdeb563fa888b900d01c4be4a1</id>
<content type='text'>
struct http_response did not provide users any void * that could be used
to maintain a state between calls to an asynchronous HTTP response.
On the other hand, the user pointer could not be used for this purpose,
since it is shared among all HTTP clients for a given struct handler
instance.

Moreover, the length callback was still not supporting this feature,
which in fact might be required by some users. Implementing this was
particularly challenging, as this broke the current assumption that
all bytes on a call to http_read were being processed.

Now, since a client request can only be partially processed because of
the length callback, http_read must take this into account so that the
remaining bytes are still available for future calls, before reading
again from the file descriptor.
</content>
</entry>
<entry>
<title>Implement form interface</title>
<updated>2025-10-02T13:52:14+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2025-09-30T21:50:33+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=a0f5f7509bb9040752fa61fe0fdb447608e22b1c'/>
<id>urn:sha1:a0f5f7509bb9040752fa61fe0fdb447608e22b1c</id>
<content type='text'>
This new interface allows library users to parse
application/x-www-form-urlencoded data conveniently.
</content>
</entry>
<entry>
<title>html: Make html_encode public</title>
<updated>2025-09-27T22:12:57+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2025-09-27T18:48:55+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=94ddbec88e57fe742f219a30145650165887f22c'/>
<id>urn:sha1:94ddbec88e57fe742f219a30145650165887f22c</id>
<content type='text'>
Among other reasons, this function can be useful to sanitize
user-generated content before assigning it do a node.
</content>
</entry>
<entry>
<title>Implement async HTTP responses</title>
<updated>2025-09-24T10:33:35+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=5a6f30440b66fe6713acb9d979dc3e6624e4c36a'/>
<id>urn:sha1:5a6f30440b66fe6713acb9d979dc3e6624e4c36a</id>
<content type='text'>
Sometimes, library users cannot return a HTTP response as soon as the
request is received, or the operations that are required to generate it
can take a long time.

In order to solve this, libweb adds a new member to struct
http_response, namely step, which must be assigned to a function
whenever a HTTP response should be generated in a non-blocking manner.
Leaving the function pointer as null will fall back to the default
behaviour.
</content>
</entry>
</feed>
