Add Swerver target (Zig HTTP/1.1+2+3 server)#131
Merged
Conversation
Swerver is a high-performance HTTP/1.1+2+3 server and API gateway written in Zig 0.16. This adds a probe target that builds swerver from source and serves the root/echo/cookie contract on port 8080. The Dockerfile clones swerver main and builds a small probe app against it (ReleaseFast). config.json points static_root at /app/docroot.
- Run the runtime container as the unprivileged 'nobody' user (mirrors TrilliumServer). Verified PID 1 runs as uid 65534 and the probe still scores 160/161 (io_uring init is unaffected). - Add --proto '=https' --tlsv1.2 to the Zig download curl so a redirect can't downgrade to plaintext. Base stays Debian trixie (documented inline): swerver's HTTP/3 path links OpenSSL 3.5's QUIC TLS API, absent from bookworm's OpenSSL 3.0.
|
Http11Probe — Compliance Comparison
✅ Baseline PassedCompliance
Smuggling
Malformed Input
Header Normalization
Commit: 6e3ccbe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Adds a probe target for swerver — a high-performance HTTP/1.1 + HTTP/2 + HTTP/3 server and API gateway written in Zig 0.16 (single-threaded event loop per process — kqueue/epoll/io_uring — with a SO_REUSEPORT fork model).
What's here
src/Servers/SwerverServer/follows the existing target layout:main, builds a small probe app against it withzig build(ReleaseFast), runs it on:8080in a slim runtime image. Build context is the repo root, matching the other targets.{"name": "Swerver", "language": "Zig"}GET /→OK,POST /echoes the body,/echodumps request headers,/cookieparses theCookieheader. Static files served from/app/docroot.Local result
Built and probed the container exactly as
probe-local.shdoes (docker build … && docker run --network host && probe):Adding swerver to the probe surfaced two genuine HTTP/1.1 conformance gaps, both now fixed upstream on swerver
main(so this target builds clean against them):Transfer-Encoding+Content-Lengthconflict (RFC 9112 §6.1 smuggling vector) — now rejected with400and connection close instead of silently droppingContent-Length.400before the header-size limit trips a431.Happy to adjust naming, layout, or the handler contract to match your conventions.