v0.2.4
The release can be checked against the following SHA-1 checksum:
cc0e1893bdcc38edecc54773e92e6c4af4798753
Changeset
- distribute the framework and VSGI as two distrincts shared libraries
- improve many aspects of the SCGI implementation
- fix the URI scheme extraction for CGI and related protocols
- flattening functions for UTF-8 request body
Valum is now distributed as two distincts shared libraries:
- libvsgi which provide all the interfaces and implementations
- libvalum which provide the framework
The change is not visible if you are building with pkg-config
; the dependencies are correctly described.
Eventually, the VSGI implementations will decoupled and loaded as dynamic modules, which should provide a nice extensibility and open the gates for custom implementations.
The new flatten_utf8
and flatten_utf8_async
complement the previously introduced flattening functions by converting directly the request body into a unicode string
. For other encodings, it is better to apply a GLib.CharsetConverter
on the input stream.
app.post ("", (req, res) => {
var data = Soup.Form.decode (req.flatten_utf8 ());
});
app.post ("some-french-endpoint", (req, res, next) => {
next (req, new ConvertedResponse (res, new CharsetConverted ("utf-8", "iso8859-1")));
}).then ((req, res) => {
var data = Soup.Form.decode (req.flatten_utf8 ());
});
The code handling non-standard CGI/1.1 headers has been moved in VSGI.CGI.Request
so that it can be consistent with real-world usage of the protocol.
The URI scheme has been fixed in VSGI.CGI
, it was not extracted and causing a warning. It is inferred from the HTTPS
environment variable and fallbacks on PATH_TRANSLATED
. Otherwise, it considers that the request is performed with HTTP.
Many improvements has been introduced for SCGI:
- buffer the netstring to avoid many blocking operations
- graceful shutdown for the
GLib.SocketService
- option to listen to any open TCP port with the
--any
flag