Skip to content

Releases: uNetworking/uWebSockets

v20.55.0

27 Dec 19:46

Choose a tag to compare

  • 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

27 Dec 01:30

Choose a tag to compare

  • Bumps the maximum HTTP receive body size from 30 bits to 62 bits (1 GB -> 4294967296 GB)

v20.53.0

23 Dec 23:10

Choose a tag to compare

  • Fixes the bug of upgrading to websocket within HttpResponse::cork callback.

v20.52.0

23 Dec 15:27
1b89d82

Choose a tag to compare

  • Routes are overwritten by default (no need to first remove it manually).

v20.51.0

19 Dec 03:52

Choose a tag to compare

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

19 Dec 03:16

Choose a tag to compare

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.

v20.49.0

10 Dec 13:16
b2ea51b

Choose a tag to compare

Dropped events, anonymous error pages

A new kind of event, "dropped" can be used to track when an outgoing message has been dropped due to current backpressure settings. This is useful in cases where tracking the status is otherwise impossible, such as when using pub/sub. See example "EchoServer.cpp" for usage.

Another change is the removal of graphical error pages (the HTML body is gone) when compiling with UWS_HTTPRESPONSE_NO_WRITEMARK.

v20.48.0

09 Nov 22:09
bc2815d

Choose a tag to compare

Pub/sub fix

Being subscribed to only one topic, followed by a publish to said topic immediately followed by unsubscription from this, single one, topic would drop the published message before it was sent. This is now fixed and no message will be dropped in this edge case.

This bug did not trigger in cases where a WebSocket was subscribed to at least one more topic, making most real-world use cases unaffected.

Full Changelog: v20.47.0...v20.48.0

v20.47.0

23 Sep 21:04
143db30

Choose a tag to compare

What's Changed

  • Don't lose ws frame payload when its header went to backpressure by @ypogribnyi in #1662

New Contributors

Full Changelog: v20.46.0...v20.47.0

v20.46.0

04 Sep 08:26
f1b10ed

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v20.45.0...v20.46.0