<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/libweb/http.c, branch v0.6.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.6.0</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/libweb/atom?h=v0.6.0'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/'/>
<updated>2026-09-27T20:11:04+00:00</updated>
<entry>
<title>http.c: Do not return partial if no file is set</title>
<updated>2026-09-27T20:11:04+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2026-09-27T20:11:04+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=284551675d7596c6de9edbf488701395823e1d3c'/>
<id>urn:sha1:284551675d7596c6de9edbf488701395823e1d3c</id>
<content type='text'>
Whereas libweb does support returning partial transfers [1], it only
does so limited to file transfers because it can be difficult or
impossible to perform a partial request for what can be otherwise
dynamically generated content.

Previously, libweb naively accepted any range request from the client
and silently replaced the response status to "206 Partial Content". [2]
However, if no FILE * had been specified by the application,
adjust_partial would treat this as a fatal error, because libweb assumed
this as a programming error by the application.

[1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Range_requests
[2]: https://en.wikipedia.org/wiki/HTTP_status#2xx_success
</content>
</entry>
<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>http.c: Ensure valid object on freelocale(3)</title>
<updated>2026-02-27T14:29:04+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2026-02-27T10:52:43+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=fca0679e438e1cf8a3db9047f57d3b2363ab417e'/>
<id>urn:sha1:fca0679e438e1cf8a3db9047f57d3b2363ab417e</id>
<content type='text'>
According to POSIX.1-2008, the behaviour is undefined if freelocale(3)
is called with an invalid object. [1]

[1]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/freelocale.html
</content>
</entry>
<entry>
<title>http.c: Break on found header</title>
<updated>2026-02-27T10:51:12+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2026-02-27T10:51:12+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=469410001bf283b658515391514d4c2077731d04'/>
<id>urn:sha1:469410001bf283b658515391514d4c2077731d04</id>
<content type='text'>
Once a given HTTP header from the list has been found, it makes no sense
to keep reading the rest from it.
</content>
</entry>
<entry>
<title>http.c: Remove unused variable</title>
<updated>2026-02-12T16:59:49+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2026-02-12T16:59:36+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=438fe10b069b355407cd42b244de5deb695f2338'/>
<id>urn:sha1:438fe10b069b355407cd42b244de5deb695f2338</id>
<content type='text'>
</content>
</entry>
<entry>
<title>http.c: Use expected timezone abbreviation</title>
<updated>2026-02-12T16:26:54+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2026-02-12T16:26:54+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=5f0cd92f0bdc74d1c087781dabc19b258bda0b2e'/>
<id>urn:sha1:5f0cd92f0bdc74d1c087781dabc19b258bda0b2e</id>
<content type='text'>
The struct tm instance consumed by append_expire is provided by users
and could refer to any timezone, rather than GMT only.

According to Wikipedia [1], timezone abbreviations are either 3 or 4
characters long, or use numeric UTC offsets.

[1]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#Time_zone_abbreviations
</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>http.c: Force POSIX locale on append_expire</title>
<updated>2026-02-12T15:11:45+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi92@disroot.org</email>
</author>
<published>2026-02-12T15:11:45+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/libweb/commit/?id=16f07314e675dd7d9d9cfb44dfb33cd81b13590d'/>
<id>urn:sha1:16f07314e675dd7d9d9cfb44dfb33cd81b13590d</id>
<content type='text'>
Otherwise, strftime(3) could return different strings depending on the
system configuration, and therefore return 0 if the resulting string
does not fit into buf.
</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>
</feed>
