Releases: uNetworking/uWebSockets
Release list
v20.59.0
- Bumps uSockets to v0.8.8
- Minor fixes
v20.58.0
Parameter routing fixes
Having multiple URL routes with differently named parameter segments at the same depth in the routing tree would cause the order of matching to be potentially different from what the documentation stated.
This release fixes that, and adds more testing for this scenario.
v20.57.0
Experimental cross-platform uWS::LocalCluster
We've always supported multi-CPU scaling as detailed in the HelloWorldThreaded.cpp example and benchmarking blog posts. However, this example has only been properly supported on Linux systems and contained some really ugly boiler plate code.
This release adds the uWS::LocalCluster helper that works properly on Windows, macOS, Linux and makes it easy to take any single-CPU app and make it scale over all available CPU-cores by default:
uWS::App(options).get(pattern, handler).listen(port, handler).run();
simply becomes
uWS::LocalCluster(options, [](uWS::App &app) {
app.get(pattern, handler).listen(port, handler);
});
This is reflected in the updated HelloWorldThreaded.cpp example and works for both SSL and non-SSL clusters.
v20.56.0 on macOS (capped at 99% CPU-time)
v20.57.0 on macOS (approaches 800% CPU-time)

v20.56.0
SSL fixes
- Don't crash on addServerName when provided files are missing
- Disable a (broken) per-SSL optimization that caused issues with backpressure in certain cases
v20.55.0
- Adds named parameter getters (as complement to integral offset getters) like so:
/* Define a parameter route */
.get("/:first/static/:second", [](auto *res, auto *req) {
/* Use the value of a parameter as response */
res->write("<h1>first is: ");
res->write(req->getParameter("first"));
res->write("</h1>");
res->write("<h1>second is: ");
res->write(req->getParameter("second"));
res->end("</h1>");
})
- Adds new example showing the above in use.
v20.54.0
- Bumps the maximum HTTP receive body size from 30 bits to 62 bits (1 GB -> 4294967296 GB)
v20.53.0
- Fixes the bug of upgrading to websocket within HttpResponse::cork callback.
v20.52.0
- Routes are overwritten by default (no need to first remove it manually).
v20.51.0
Dynamic 404 page
The 404 page is no longer a static error page that severs the connection, but now lives as a default route for App.any("/*"). This means two things:
- You can remove it by calling
App.any("/*", nullptr)or attach your own page to that route. - It won't kill the connection as if a true protocol error, but will use proper keep alive instead.
v20.50.0
Some much needed HTTP adjustments
The ANY method (App::any) will now properly match with all possible HTTP methods, not just all of the standard ones. This is needed to properly implement your own (reliable) 404 page, or to reliably route all traffic to some common handler (what Bun does).
A slight behavioral change was needed:
- Matching is now ordered by method first, URL second. This means that, for instance, a match with static method and parameter URL will match before an ANY method with static URL. This is very similar to previous behavior, but more easy to understand and simpler to implement.
This behavioral change should be practically unnoticeable.
More:
- Adds the environment variable UWS_HTTP_MAX_HEADERS_SIZE for controlling maximum (total) HTTP header size allowed. Default is 4kb.
- Adjusts the default maximum header count allowed, raised from 50 to 100 and controlled explicitly via added compiler define UWS_HTTP_MAX_HEADERS_COUNT.