The GNU Project has released version 1.0.0 of the libmicrohttpd library, which is marked as the first stable release in 16 years. The library, written in C, provides a simple API for embedding HTTP server functionality into applications. Supported platforms include GNU/Linux, FreeBSD, OpenBSD, NetBSD, Solaris, Android, macOS, Win32, and z/OS. The code is distributed under the LGPL 2.1+ license. By default, the library occupies about 200 KB when built, and in minimal build mode, it is around 32 KB. It only uses libc as a dependency, along with libgnutls for optional TLS support.
The library supports HTTP 1.1, TLS, incremental processing of POST requests, accepting connections from multiple network ports, basic and digest authentication, IPv6, SHOUTcast, various connection multiplexing methods (select, poll, epoll), and threading models (for example, a thread pool or one thread per connection). To reduce overhead arising from context switching between the kernel and user space, the number of system calls during operation is minimized. The security of the libmicrohttpd codebase has been validated by audits conducted by Mozilla and Red Hat.
The most notable changes compared to the previous release:
- The code for parsing client requests has been rewritten to fully comply with RFC 9110 and 9112, providing both strict and lenient compliance modes to balance compatibility with higher security.
- The implementation of digest authentication has been revamped, significantly expanding support for features present in RFC 7617, including SHA-512, userhash, and username in extended notation. Support for the older RFC 2069 and the use of MD5 and SHA-256 hashes has also been preserved.
- Improved performance in multithreaded environments and during socket polling modes.
- The implementation of basic authentication has been reworked, with additional features offered in the ABI.
- The code for initializing GnuTLS has been redesigned. It now supports both standard and libmicrohttpd-specific GnuTLS system configurations and allows for the overriding of individual settings in the GnuTLS system configuration.
In the future, development will focus on the libmicrohttpd 2 branch, which will ensure support for HTTP/2 and HTTP/3 protocols, as well as work on simplifying the API and supporting different backends for TLS. The beginning of work on the new branch will be financed by the Sovereign fund, established in Germany to promote the development of open digital infrastructure and open source ecosystems.
Source: opennet.ru
