<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/libweb/examples/async, branch fix-double-free</title>
<subtitle>Small and lightweight web framework written in C99 and POSIX.1-2008.
</subtitle>
<id>https://gitea.privatedns.org/xavi/libweb/atom?h=fix-double-free</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/libweb/atom?h=fix-double-free'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/'/>
<updated>2025-10-07T23:57:42+00:00</updated>
<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>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>
</feed>
