uWebSockets

Simple, secure & standards compliant web server for the most demanding of applications

APACHE-2.0 License

Downloads
13
Stars
16.9K
Committers
45

Bot releases are visible (Hide)

uWebSockets - v20.24.0

Published by uNetworkingAB about 2 years ago

Date, Transfer-Encoding fixes

  • The HTTP server now appends a valid "Date" header to responses.
  • Fixes broken keep-alive for HEAD, OPTIONS, TRACE, CONNECT and DELETE methods introduced in v20.23.0 while adding chunked encoding support.
uWebSockets - v20.23.0

Published by uNetworkingAB about 2 years ago

HTTP chunked transfer-encoding 🔪 🍰

  • You can now send and receive data that is chunked according to Transfer-Encoding: chunked.
  • Nothing changes from a user perspective; business as usual.
uWebSockets - v20.22.0

Published by uNetworkingAB about 2 years ago

Dynamically removable HTTP routes and SNI domains

Together with the SNI improvements from v20.18.0 you can now add/remove HTTP routes dynamically, both for the root ("catch all") domain, and for any specific SNI domain.

If you added a route with

app.get("/hello", [](auto *res, auto *req) {

});

You now remove it with app.get("/hello", nullptr);

The same applies to routes added under a SNI name - browsing to the domain with app.domain("server_name") you can then remove the route added.

Note that you cannot remove WebSocket routes just yet (but doing so could make sense semantically).

uWebSockets - v20.20.0

Published by uNetworkingAB about 2 years ago

  • Fixes undefined behavior in App::removeServerName introduced in v20.18.0
uWebSockets - v20.19.0

Published by uNetworkingAB about 2 years ago

Unix sockets

Thanks to @Young-Flash it's now possible to serve HTTP and WebSockets over Unix sockets - which interestingly works on all three platforms Windows, Linux, macOS 🤔

uWebSockets - v20.18.0

Published by uNetworkingAB about 2 years ago

Improved SNI support

This is a backwards compatible change that detaches the URL router from the App, and moves it underneath the SNI support (if any). The new hierarchy is: App -> (SNI) -> URL router.

SNI

One App can have the root level SSL certificate and its URL routes, and/or many per-domain SSL certificates and their own isolated URL routes.

You "browse" between different SNI domains by calling the new function app.domain(server name) before calling app.get or app.post or any such route registration call. This can be chained together in builder pattern. Last "browsed to" SNI is under where you register the URL route handler.

See example ServerName for usage.

uWebSockets - v20.17.0

Published by uNetworkingAB about 2 years ago

Improved HTTP timeout logic

When a client uploads (HTTP POST) a large file there has been a less-than-ideal timeout logic in uWS, where practically 0.1 byte/sec was enough to keep the connection open. This version bumps the required upload throughput to 16kB/sec as the lowest allowed. Any client uploading slower, will be dropped. You can configure the constant HTTP_RECEIVE_THROUGHPUT_BYTES as you wish.

uWebSockets - v20.16.0

Published by uNetworkingAB about 2 years ago

HTTP/3 Cinema 🍿 📽️

While still highly experimental, the HTTP/3 support is now functional enough to stream a large video file correctly and without corruption. The video is shown being played by Firefox here, but has since also been tested to work with Chrome, curl and quiche-client.

This is a very visual milestone - it shows not only HTTP/3 working, but both HTTP/1 and HTTP/3 working together on the same thread. As you can see in the picture, an HTTP/1 server is used to instruct (at least Firefox?) the browser to go use the HTTP/3 one instead.

h3cinema

uWebSockets - v20.15.0

Published by uNetworkingAB about 2 years ago

Experimental HTTP/3 via uWS::H3App

  • Adds experimental uWS::H3App and example. With this type of app you can handle HTTP/3 requests with the same identical interface as for uWS::SSLApp, uWS::App. No code changes needed.
  • This support is hidden under WITH_QUIC flag and entirely unsupported / for testing feedback / smoke testing only.
  • Benchmarks are here.
  • Working example is here.

How to test it

  • This is experimental work entirely hidden under the WITH_QUIC make flag and disabled by default.
  • Compile with WITH_BORINGSSL=1 WITH_QUIC=1 make and run the Http3Server binary. You can test it using quiche-client over IPv6 (you will need an IPv6 localhost address or else it will fail to listen). See Http3Server.cpp for an example quiche-client invocation.
  • You first need to compile both lsquic and boringssl in respective git submodule paths. See their documentation for how to do this (it's pretty easy).
uWebSockets - v20.14.0

Published by over 2 years ago

Streaming large HTTP response fix

  • Fixes a potential heap-use-after-free when finishing (tryEnd, end) an Http response within onWritable callback (captured variables are destroyed).
  • Affects only users who stream large Http responses with the use of onWritable callback. If your application never sets an onWritable callback, then you're not affected.
  • See uWebSockets.js/examples/VideoStreamer.js for an example of affected use.

Thanks to @o5k @zdm

uWebSockets - v20.13.0

Published by over 2 years ago

This release fixes a minor issue where the HTTP parser did not allow header values with bytes above 7-bit ASCII. Now it is possible to receive any byte sequence except for terminating CRLF. A unit test for this was added.

uWebSockets - v20.12.0

Published by over 2 years ago

Safari 15.4 finally fixed?

It is believed that Apple finally fixed their permessage-deflate ("WebSocket compression") in Safari 15.4. This release will disable permessage-deflate for broken versions of Safari (15.0 - 15.3), but not for 15.4 and forwards. If you experience issues with Safari 15.4 and compression, report it and we can mark 15.4 as broken as well. Apple is not a transparent company and we cannot know what black magic they are up to and their releases do not explain anything.

Think different, think Apple. And now punch yourself in the face. Mmm, nosebleed.

uWebSockets - v20.11.0

Published by over 2 years ago

  • All versions of Safari 15 for iOS and macOS are entirely broken when it comes to WebSocket. This release adds exceptions to the standard, applied only to Safari user agents in order to play along with Apple's thorough and unmatched incompetence.
uWebSockets - v20.10.0

Published by over 2 years ago

  • Last release broke unmasking of large WebSocket messages
uWebSockets - v20.9.0

Published by almost 3 years ago

  • Adds HttpResponse::pause, HttpResponse::resume for throttling of data I/O.
  • Adds new fast path for zero masked WebSocket messages and optimizes large message unmasking.
  • Fixes HttpRouter ordering issues in certain undiscovered edge cases & adds tests.
  • Adds endWithoutBody for responding without a body or content-length.
  • Clear subscriptions before calling close handler, not after.
uWebSockets - v20.8.0

Published by almost 3 years ago

  • CompressOptions got scrambled in v20.7.0 which broke compression, this is now fixed.
uWebSockets - v20.7.0

Published by almost 3 years ago

More decompressors

  • Fixes DEDICATED_DECOMPRESSOR introduced in v20.3.0
  • Adds a range of DEDICATED_DECOMPRESSOR_32KB .. DEDICATED_DECOMPRESSOR_512B
uWebSockets - v20.6.0

Published by about 3 years ago

Minor build fix

Fixes a build issue where TopicTree::iteratingSubscriber was private within WebSocket::iterateTopics function.

uWebSockets - v20.5.0

Published by about 3 years ago

Reordering & flags fix

  • In v19.8.0 while optimizing large message sending, a reordering bug was introduced that may reorder outgoing messages.
  • uSockets 0.8.1 fixes a bug passing invalid flags down to send syscall.
uWebSockets - v20.4.0

Published by about 3 years ago

Optimizes large publishes

  • Large message publishing is now just as fast as regular WebSocket::send and bypasses any effort to coalesce with small messages.
  • Fixes a potential memory leak in TopicTree::publish.