<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/libweb/server.c, branch v0.2.0</title>
<subtitle>Small and lightweight web framework written in C99 and POSIX.1-2008.
</subtitle>
<id>https://gitea.privatedns.org/xavi/libweb/atom?h=v0.2.0</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/libweb/atom?h=v0.2.0'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/'/>
<updated>2024-01-20T00:19:57+00:00</updated>
<entry>
<title>server.c: Fix wrong priority for do_exit</title>
<updated>2024-01-20T00:19:57+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2024-01-20T00:09:18+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=91ff743df9fcee048cb44dba0c7047df04454dd2'/>
<id>urn:sha1:91ff743df9fcee048cb44dba0c7047df04454dd2</id>
<content type='text'>
Under some specific circumstances, poll(2) would return a positive
integer, but do_exit might had been previously set. This caused libweb
to ignore SIGTERM, with the potential risk for an endless loop.
</content>
</entry>
<entry>
<title>Merge pull request 'Fix double-free on failed `server_client_close`' (#2) from midokura-xavi/libweb:fix-double-free into master</title>
<updated>2023-11-20T15:27:28+00:00</updated>
<author>
<name>xavi</name>
<email>xavi@noreply.localhost</email>
</author>
<published>2023-11-20T15:27:28+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=8f1ad3124e9e063ca0ee7c2548c747b20de3529d'/>
<id>urn:sha1:8f1ad3124e9e063ca0ee7c2548c747b20de3529d</id>
<content type='text'>
Reviewed-on: https://gitea.privatedns.org/xavi/libweb/pulls/2
</content>
</entry>
<entry>
<title>Fix double-free on failed server_client_close</title>
<updated>2023-11-20T15:25:58+00:00</updated>
<author>
<name>Xavier Del Campo</name>
<email>xavier.delcampo@midokura.com</email>
</author>
<published>2023-11-20T11:20:51+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=59a67a7541ee1559b140494c21a25b195246a4fa'/>
<id>urn:sha1:59a67a7541ee1559b140494c21a25b195246a4fa</id>
<content type='text'>
Even if server_client_close fails, it is needed for client_free to
remove the dangling reference from h-&gt;clients.
</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>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>server.c: Replace sequential calls with loop</title>
<updated>2023-10-10T21:16:11+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-10-10T21:16:11+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=832e198f8c77970b5b923eb18201ba83d9c72b80'/>
<id>urn:sha1:832e198f8c77970b5b923eb18201ba83d9c72b80</id>
<content type='text'>
</content>
</entry>
<entry>
<title>server.c: Fix build on FreeBSD</title>
<updated>2023-09-26T20:58:11+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-09-26T20:58:11+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=8b39bc5db98c252269fe526a8c411bf245770ba2'/>
<id>urn:sha1:8b39bc5db98c252269fe526a8c411bf245770ba2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move header files to subdirectory</title>
<updated>2023-07-20T23:28:38+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-07-20T21:47:33+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=8c3ba33ced08b211db0cd5f81675bdf62f55acc7'/>
<id>urn:sha1:8c3ba33ced08b211db0cd5f81675bdf62f55acc7</id>
<content type='text'>
Since slweb is meant as a library, it is advisable to keep public header
files under their own directory in order to avoid name clashing i.e.,

 #include "something.h"

Now becomes:

 #include "slweb/something.h"
</content>
</entry>
<entry>
<title>server.c: Fix typo</title>
<updated>2023-07-20T21:52:55+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-07-05T22:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=01cebe5917c6f3cdca0e13f7b681bb0d6867bb75'/>
<id>urn:sha1:01cebe5917c6f3cdca0e13f7b681bb0d6867bb75</id>
<content type='text'>
</content>
</entry>
<entry>
<title>server.c: Fix undefined behaviour on &gt;1 clients</title>
<updated>2023-07-20T21:52:55+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2023-07-03T11:36:46+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=a527164cb5b06055c7696eb4247f8cebee6cf23d'/>
<id>urn:sha1:a527164cb5b06055c7696eb4247f8cebee6cf23d</id>
<content type='text'>
server.c kept an array of all of its active clients, calling realloc(3)
everytime its size had to be modified. However, reallocating this array
had the undesired consequence of moving other active clients to other
memory locations.

Potentially, this would result in dangling pointers from other
components that also kept pointers to struct server_client instances
e.g.: handler.c.

For this reason, the array-based approach has been completely dropped,
in favour of a doubly-linked list.
</content>
</entry>
</feed>
