Add uWebSockets (C++) - #152
Merged
Merged
Conversation
Http11Probe — Compliance Comparison
✅ Baseline PassedCompliance
Smuggling
Malformed Input
Header Normalization
Commit: 042301b |
Requested by the maintainer in uNetworking/uWebSockets.js#1298: the C++ library rather than the Node binding, built from master so their fixes show up in these results as they land. Implements the four probe endpoints on top of upstream's own EchoBody.cpp pattern — any() routes with the wildcard last, range-for over the request for /echo, and onData/onAborted for the body echo. Responses inside onData are already corked by uWS, so no explicit cork is needed. Built as a two-stage image: uSockets via its own make, then g++ with the flags build.c uses, minus -march=native so the binary does not depend on the builder's CPU. The clone is deliberately unpinned, which is the point of the request, and only the uSockets submodule is initialised — the rest are fuzzing corpora and test suites. Scores 119/159 locally, with a verdict identical to uWebSockets.js on all 213 tests.
MDA2AV
force-pushed
the
add-uwebsockets-cpp
branch
from
August 15, 2026 18:23
d665698 to
bd9ff7c
Compare
|
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.



So this adds the C++ library, tracking
master.Tracking master, not a tag
The clone is deliberately unpinned — that is the whole point of the request. Each rebuild picks up whatever
masteris at that moment, so upstream fixes surface here without a PR.Worth stating the tradeoff plainly: builds are no longer reproducible, and a broken upstream commit will show up as this server regressing rather than as a build failure. That is the behaviour asked for, but it is the opposite of the lock-file pinning #151 just added, so it should be a conscious choice rather than an inconsistency someone later "fixes".
Only the
uSocketssubmodule is initialised; the others are fuzzing corpora and test suites.Build
Two stages.
make -C uSockets, theng++with the flags upstream'sbuild.cuses — minus-march=native, which would otherwise bake the builder's CPU into the binary. Runtime stage isdebian:trixie-slim+zlib1g, running asnobody.Endpoints follow upstream's own
EchoBody.cpp(described there as "Can be used to test compliance of HTTP spec"):any()routes with the wildcard last, range-for over the request for/echo,onData/onAbortedfor the body echo. Responses insideonDataare already corked by uWS, so there is no explicitcork().The Node.js remark does not hold for compliance
Built from
fe7da4cb0562, run against the same suite as #151:That is identical to uWebSockets.js — not similar, identical. Across all 213 tests there are zero verdict differences, and exactly one status-code difference:
SMUG-CHUNK-SPILL200505Which makes sense — the Node addon embeds this same C++ parser. Node.js may well constrain throughput, but it is not what is constraining standards behaviour: every finding reported on #151 reproduces here, including the generic
505 "This server does not support HTTP/1.0."for valid HTTP/1.1 requests and the accepted duplicateContent-Length.That is arguably the more useful result for upstream. Fixes belong in the C++ parser, and both entries will move together when they land.
Relationship to #151
Independently mergeable — separate directory (
UWebSocketsCppServer) and separate page slug, no conflicts. Whether to keep both or close #151 is a judgement call: the maintainer said "not JS", but having both is what demonstrates the bindings do not diverge, and it keeps that claim measured rather than assumed. Happy to fold this into a single entry instead.Verified locally
Image builds from a clean context; all six endpoint contracts from the Add a Framework guide pass; container runs as
nobody; site build rendersservers/uwebsockets-cpp.htmlbound torenderServerPage('uWebSockets').