Skip to content

Release v0.1.6-pre

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 30 May 08:49

ZAP Release v0.1.6-pre

Updates

BUGFIX: setCookie() with path and/or domain

A bug in facil.io accidentally overwrote parts of the cookie header with
spaces. If a path but no domain was specified, path would be
overwritten to ath, leading to the impression that the path would be
ignored by zap. If both domain and path were specified, domain would
become main, but the path part would come later and escape the
overwriting.

My latest patch to facil.io corrects this behavior. Hence, the update.

Using it

To use in your own projects, put this dependency into your build.zig.zon:

        // zap v0.1.6-pre
        .zap = .{
            .url = "https://github.com/zigzap/zap/archive/refs/tags/v0.1.6-pre.tar.gz",
            .hash = "1220a3eab193523b30721dae56a763468b7348b3d1f0b3364d68f6d548c753a72c5a",
        }

Here is a complete build.zig.zon example:

.{
    .name = "My example project",
    .version = "0.0.1",

    .dependencies = .{
        // zap v0.1.6-pre
        .zap = .{
            .url = "https://github.com/zigzap/zap/archive/refs/tags/v0.1.6-pre.tar.gz",
            .hash = "1220a3eab193523b30721dae56a763468b7348b3d1f0b3364d68f6d548c753a72c5a",
        }
    }
}

Then, in your build.zig's build function, add the following before exe.install():

    const zap = b.dependency("zap", .{
        .target = target,
        .optimize = optimize,
    });
    exe.addModule("zap", zap.module("zap"));
    exe.linkLibrary(zap.artifact("facil.io"));