From 91c0df61d040100463daaac4963e2826f58cae64 Mon Sep 17 00:00:00 2001 From: Hreniuc Cristian-Alexandru Date: Thu, 23 Sep 2021 16:00:59 +0300 Subject: [PATCH] Fix reuse of sliding window in WebSocket permessage_deflate: Original commit message: Use zlib::Flush::sync instead of zlib::Flush::full, for stream compression https://github.com/boostorg/beast/issues/2313 fixes #2313 closes #2318 --- CHANGELOG.md | 1 + include/boost/beast/websocket/detail/impl_base.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2dc86bd..19310b31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ Version XXX: +* Fix reuse of sliding window in WebSocket permessage_deflate. * Fix accept error handling in http_server_async example. * Move library-specific docca configuration to Beast. * Remove dependency on RTTI in `test::stream`. diff --git a/include/boost/beast/websocket/detail/impl_base.hpp b/include/boost/beast/websocket/detail/impl_base.hpp index fc5bf0bc..00912998 100644 --- a/include/boost/beast/websocket/detail/impl_base.hpp +++ b/include/boost/beast/websocket/detail/impl_base.hpp @@ -137,7 +137,7 @@ struct impl_base return false; if(zs.avail_out >= 6) { - zo.write(zs, zlib::Flush::full, ec); + zo.write(zs, zlib::Flush::sync, ec); BOOST_ASSERT(! ec); // remove flush marker zs.total_out -= 4;