tag:github.com,2008:https://github.com/uNetworking/uWebSockets/releasesRelease notes from uWebSockets2026-02-20T00:25:53Ztag:github.com,2008:Repository/54360307/v20.75.02026-02-20T00:56:33Zv20.75.0<ul>
<li>Adds UWS_USE_SIMDUTF for using simdutf instead of default Utf8 validation</li>
<li>Show method and URL in terminating error message</li>
<li>Fixes some compilation error for modern C++23 compilers</li>
<li>Adds secure reloading gzip file server example</li>
</ul>uNetworkingABtag:github.com,2008:Repository/54360307/v20.74.02025-02-21T15:47:14Zv20.74.0<h1>Minor libdeflate correction</h1>
<ul>
<li>libdeflate is now compatible with uWS::DEDICATED_DECOMPRESSOR and will be used if (and only if) the WebSocket's negotiation downgraded to equivalent of uWS::SHARED_DECOMPRESSOR (client_no_context_takeover). This will boost performance when possible. Of course, uWS::SHARED_DECOMPRESSOR as decompressor will always use libdeflate.</li>
<li>In other cases, zlib will be used regardless.</li>
</ul>uNetworkingABtag:github.com,2008:Repository/54360307/v20.73.02025-02-20T13:44:00Zv20.73.0<h1>libdeflate as inflation ("decompression") fast path</h1>
<p>Resurrecting support of <a href="https://github.com/ebiggers/libdeflate">libdeflate</a>, now specifically only for inflation and only as a fast path to zlib.</p>
<p><code>WITH_LIBDEFLATE=1 make</code></p>
<p>builds examples using this fast path (you need to build the submodule first). Improved <code>load_test.c</code> benchmark can now highlight inflation cost:</p>
<p>For me and my particular test system:</p>
<ul>
<li>With dynamically linked zlib - 110k msg/sec inflated and echoed 300 byte JSON messages</li>
<li>With statically linked zlib-cloudflare - 130k</li>
<li><strong>With libdeflate as fast path - 180k</strong></li>
<li>Without any inflation - 320k</li>
</ul>
<p>Note: WITH_DEFLATE is only compatible with uWS::SHARED_DECOMPRESSOR!</p>
<p><a target="_blank" rel="noopener noreferrer" href="https://private-user-images.githubusercontent.com/110806833/415195845-19420d90-aa69-4a92-b51f-198b8daf9604.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVk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FzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDMxNlQyMDQzMDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lNjg2OTA2ODNkODYwYzYwYzQ1ZTc4MDc4YTMyM2VkYjZlMmI0MTFjYzgzMTFkMjU4MzViZjJjZDQ1YjQzYjc2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.7FQZS5zDkLHa4_DZ5bPG5nNgy8YqG_fT_tZCJKb1xoc" alt="Inflation performance for 300 byte JSON (msg_sec echoed) (1)" content-type-secured-asset="image/png" style="max-width: 100%;"></a></p>uNetworkingABtag:github.com,2008:Repository/54360307/v20.72.02025-01-28T14:40:37Zv20.72.0<h1>Prepared Messages for Efficient Sending and Publishing</h1>
<p>A feature from v0.14, previously removed due to lack of interest, has now been revived! Check out the demo in <code>examples/Precompress.cpp</code> to see it in action.</p>
<p>A <code>PreparedMessage</code> is a message that is compressed once but can be sent multiple times. This requires the <code>SHARED_COMPRESSOR</code> option but works with any decompressor option. The core idea is to decouple the compression process from the act of sending the message, reducing the per-socket computational overhead of compression to near zero.</p>
<h3>Ideal Use Case</h3>
<p>This feature is ideal for scenarios where you need to send snapshots of a data stream to multiple recipients. Here’s how it could work:</p>
<ul>
<li>A timer periodically creates a new <code>PreparedMessage</code> containing the latest snapshot of the data (e.g., every 500ms).</li>
<li>When a WebSocket connects, it receives the most recent prepared snapshot, followed by incremental updates (deltas) from that point onward.</li>
<li>If the snapshot is large, pre-compressing it as a <code>PreparedMessage</code> eliminates the need for repeated compression, significantly reducing overhead for each socket.</li>
</ul>
<h3>Important Notes</h3>
<ul>
<li>This feature <strong>only works with <code>SHARED_COMPRESSOR</code></strong>. Using a sliding window compression method is incompatible with this optimization.</li>
<li>New methods have been added to support this feature:
<ul>
<li><code>WebSocket::sendPrepared</code></li>
<li><code>App::publishPrepared</code></li>
<li><code>Loop::prepareMessage</code></li>
</ul>
</li>
<li>You can create <code>PreparedMessage</code> objects on any thread, as long as that thread has its own <code>Loop</code> (which is automatically created for you via <code>Loop::get()</code>). However, in such cases, you must handle synchronization manually. Refer to <code>examples/Precompress.cpp</code> for guidance.</li>
</ul>
<p>This release introduces the interface and its initial implementation. While memory-saving optimizations are not included in this release, they may be addressed in future updates.</p>uNetworkingABtag:github.com,2008:Repository/54360307/v20.71.02024-12-04T02:59:55Zv20.71.0<ul>
<li>Examples are built in parallel</li>
<li>Supports building with all _LIBCPP_HARDENING_MODE</li>
<li>(Experimental) cached HTTP support is reverted for now, restoring fuzz builds</li>
<li>h1spec and test subject is added to CI</li>
<li>Disallow duplicate Host headers as per RFC9112</li>
</ul>uNetworkingABtag:github.com,2008:Repository/54360307/v20.70.02024-10-26T21:18:17Zv20.70.0<h2>More HTTP testing & corrections</h2>
<p>This release adds more HTTP tests and makes some minor corrections for passing those tests:</p>
<p><a target="_blank" rel="noopener noreferrer" href="https://private-user-images.githubusercontent.com/110806833/380452631-57e7f3e6-82ea-4ca6-896c-5005cf8da44c.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM2OTQwODUsIm5iZiI6MTc3MzY5Mzc4NSwicGF0aCI6Ii8xMTA4MDY4MzMvMzgwNDUyNjMxLTU3ZTdmM2U2LTgyZWEtNGNhNi04OTZjLTUwMDVjZjhkYTQ0Yy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMzE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDMxNlQyMDQzMDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01YTE2NWI1NzUyZjQ4NjI4ZGVmYjUyYTA5NDQ4MjQzMzQ3MDVhYzAyNzI4OTFlMTBhYWViZmE3ZjlmYzQzZGQ4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.EUTH0J5ujnJJ4CaJLzE9vmqSvWCh9QcU7ybTyPzXlpw"><img src="https://private-user-images.githubusercontent.com/110806833/380452631-57e7f3e6-82ea-4ca6-896c-5005cf8da44c.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM2OTQwODUsIm5iZiI6MTc3MzY5Mzc4NSwicGF0aCI6Ii8xMTA4MDY4MzMvMzgwNDUyNjMxLTU3ZTdmM2U2LTgyZWEtNGNhNi04OTZjLTUwMDVjZjhkYTQ0Yy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMzE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDMxNlQyMDQzMDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01YTE2NWI1NzUyZjQ4NjI4ZGVmYjUyYTA5NDQ4MjQzMzQ3MDVhYzAyNzI4OTFlMTBhYWViZmE3ZjlmYzQzZGQ4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.EUTH0J5ujnJJ4CaJLzE9vmqSvWCh9QcU7ybTyPzXlpw" alt="Screenshot 2024-10-26 230016" content-type-secured-asset="image/png" style="max-width: 100%;"></a></p>uNetworkingABtag:github.com,2008:Repository/54360307/v20.69.02024-10-25T21:14:24Zv20.69.0<h1>HTTP spec. compliance testing</h1>
<p>A basic HTTP RFC9112 spec. compliance test has been added and minor changes have been made to pass all tests immediately:</p>
<p><a target="_blank" rel="noopener noreferrer" href="https://private-user-images.githubusercontent.com/110806833/380326199-fb35a83f-71df-4580-a430-f08ca57d9945.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM2OTQwODUsIm5iZiI6MTc3MzY5Mzc4NSwicGF0aCI6Ii8xMTA4MDY4MzMvMzgwMzI2MTk5LWZiMzVhODNmLTcxZGYtNDU4MC1hNDMwLWYwOGNhNTdkOTk0NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMzE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDMxNlQyMDQzMDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jM2VkNGIyMDlmNGVjNTZiYjVlMmM0NTZhZDU0YTVmZTNiZjA1NWRjYmY0ZTg2MGRkOWI4NTI1ODU4OGZlZmJmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.QJUkUL-FJCKRQXmQ5xFXLbk5gcSniQaEiY3unLl9qQY"><img src="https://private-user-images.githubusercontent.com/110806833/380326199-fb35a83f-71df-4580-a430-f08ca57d9945.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM2OTQwODUsIm5iZiI6MTc3MzY5Mzc4NSwicGF0aCI6Ii8xMTA4MDY4MzMvMzgwMzI2MTk5LWZiMzVhODNmLTcxZGYtNDU4MC1hNDMwLWYwOGNhNTdkOTk0NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMzE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDMxNlQyMDQzMDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jM2VkNGIyMDlmNGVjNTZiYjVlMmM0NTZhZDU0YTVmZTNiZjA1NWRjYmY0ZTg2MGRkOWI4NTI1ODU4OGZlZmJmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.QJUkUL-FJCKRQXmQ5xFXLbk5gcSniQaEiY3unLl9qQY" alt="Screenshot 2024-10-25 230748" content-type-secured-asset="image/png" style="max-width: 100%;"></a></p>
<p>This basic test catches no issues in Node.js, but it catches 2 issues in Deno (reported). The test can be found here:</p>
<p><a href="https://github.com/uNetworkingAB/h1spec">https://github.com/uNetworkingAB/h1spec</a></p>
<p>In contrast, running the test on completely broken servers like mrhttp you get an obvious indication of so:</p>
<p><a target="_blank" rel="noopener noreferrer" href="https://private-user-images.githubusercontent.com/110806833/380326888-025b1e19-b55d-405e-b37a-f0064a2c0842.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM2OTQwODUsIm5iZiI6MTc3MzY5Mzc4NSwicGF0aCI6Ii8xMTA4MDY4MzMvMzgwMzI2ODg4LTAyNWIxZTE5LWI1NWQtNDA1ZS1iMzdhLWYwMDY0YTJjMDg0Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1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hlYWRlcnM9aG9zdCJ9.LDGVAYfX_8LAS2i1KmgbHwkKwRAhAdW7IbBZGMv9JlY" alt="Screenshot 2024-10-25 231156" content-type-secured-asset="image/png" style="max-width: 100%;"></a></p>uNetworkingABtag:github.com,2008:Repository/54360307/v20.68.02024-10-21T10:47:33Zv20.68.0<h1>Improved (restored) backwards compatibility</h1>
<p>For some users, recent introduction of CachedApp broke seamless backwards compatibility. If you rely on <code>uWS::App</code> being <code>uWS::TemplatedApp<false></code> and not something else (like <code>uWS::CachedApp<false></code> 😉), this release fixes your build:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" typedef uWS::TemplatedApp<false> App;
typedef uWS::TemplatedApp<true> SSLApp;"><pre class="notranslate"><code> typedef uWS::TemplatedApp<false> App;
typedef uWS::TemplatedApp<true> SSLApp;
</code></pre></div>uNetworkingABtag:github.com,2008:Repository/54360307/v20.67.02024-09-24T06:18:40Zv20.67.0<ul>
<li>Adds removeChildApp</li>
</ul>uNetworkingABtag:github.com,2008:Repository/54360307/v20.66.02024-09-11T16:18:46Zv20.66.0<h1>Minor HTTP corrections</h1>
<ul>
<li>Emit 431 on too many headers (not just too long headers)</li>
<li>Don't emit 505 on fragmented request line (regression since 505 was introduced)</li>
</ul>uNetworkingAB