mirror of
https://github.com/boostorg/beast.git
synced 2025-08-02 06:15:24 +02:00
Fix basic_parser::maybe_flatten (#462)
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
Version 53:
|
||||||
|
|
||||||
|
* Fix basic_parser::maybe_flatten
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Version 52:
|
Version 52:
|
||||||
|
|
||||||
* flat_buffer is an AllocatorAwareContainer
|
* flat_buffer is an AllocatorAwareContainer
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <beast/core.hpp>
|
||||||
#include <beast/http.hpp>
|
#include <beast/http.hpp>
|
||||||
#include <boost/asio.hpp>
|
#include <boost/asio.hpp>
|
||||||
#include <boost/asio/ssl.hpp>
|
#include <boost/asio/ssl.hpp>
|
||||||
@@ -45,7 +46,7 @@ int main()
|
|||||||
beast::http::write(stream, req);
|
beast::http::write(stream, req);
|
||||||
|
|
||||||
// Receive and print HTTP response using Beast
|
// Receive and print HTTP response using Beast
|
||||||
beast::multi_buffer b;
|
beast::flat_buffer b;
|
||||||
beast::http::response<beast::http::dynamic_body> resp;
|
beast::http::response<beast::http::dynamic_body> resp;
|
||||||
beast::http::read(stream, b, resp);
|
beast::http::read(stream, b, resp);
|
||||||
std::cout << resp;
|
std::cout << resp;
|
||||||
|
@@ -238,7 +238,7 @@ maybe_flatten(
|
|||||||
// flatten
|
// flatten
|
||||||
buffer_copy(boost::asio::buffer(
|
buffer_copy(boost::asio::buffer(
|
||||||
buf_.get(), buf_len_), buffers);
|
buf_.get(), buf_len_), buffers);
|
||||||
return {buf_.get(), buf_len_};
|
return {buf_.get(), len};
|
||||||
}
|
}
|
||||||
|
|
||||||
template<bool isRequest, class Derived>
|
template<bool isRequest, class Derived>
|
||||||
|
Reference in New Issue
Block a user