diff --git a/CHANGELOG.md b/CHANGELOG.md index bc94f71e..b14ad70d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Version 53: + +* Fix basic_parser::maybe_flatten + +-------------------------------------------------------------------------------- + Version 52: * flat_buffer is an AllocatorAwareContainer diff --git a/examples/ssl/http_ssl_example.cpp b/examples/ssl/http_ssl_example.cpp index 20a8c652..b179ccab 100644 --- a/examples/ssl/http_ssl_example.cpp +++ b/examples/ssl/http_ssl_example.cpp @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // +#include #include #include #include @@ -45,7 +46,7 @@ int main() beast::http::write(stream, req); // Receive and print HTTP response using Beast - beast::multi_buffer b; + beast::flat_buffer b; beast::http::response resp; beast::http::read(stream, b, resp); std::cout << resp; diff --git a/include/beast/http/impl/basic_parser.ipp b/include/beast/http/impl/basic_parser.ipp index 03754441..bb64f7dc 100644 --- a/include/beast/http/impl/basic_parser.ipp +++ b/include/beast/http/impl/basic_parser.ipp @@ -238,7 +238,7 @@ maybe_flatten( // flatten buffer_copy(boost::asio::buffer( buf_.get(), buf_len_), buffers); - return {buf_.get(), buf_len_}; + return {buf_.get(), len}; } template