diff options
Diffstat (limited to 'boost/beast/http/basic_file_body.hpp')
-rw-r--r-- | boost/beast/http/basic_file_body.hpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/boost/beast/http/basic_file_body.hpp b/boost/beast/http/basic_file_body.hpp index cec72a8f54..6d1de9a3b8 100644 --- a/boost/beast/http/basic_file_body.hpp +++ b/boost/beast/http/basic_file_body.hpp @@ -239,8 +239,8 @@ public: // Constructor. // - // `m` holds the message we are serializing, which will - // always have the `basic_file_body` as the body type. + // `h` holds the headers of the message we are + // serializing, while `b` holds the body. // // Note that the message is passed by non-const reference. // This is intentional, because reading from the file @@ -262,8 +262,7 @@ public: // a time. // template<bool isRequest, class Fields> - writer(message< - isRequest, basic_file_body, Fields>& m); + writer(header<isRequest, Fields>& h, value_type& b); // Initializer // @@ -296,9 +295,11 @@ template<class File> template<bool isRequest, class Fields> basic_file_body<File>:: writer:: -writer(message<isRequest, basic_file_body, Fields>& m) - : body_(m.body()) +writer(header<isRequest, Fields>& h, value_type& b) + : body_(b) { + boost::ignore_unused(h); + // The file must already be open BOOST_ASSERT(body_.file_.is_open()); @@ -398,13 +399,12 @@ public: // // This is called after the header is parsed and // indicates that a non-zero sized body may be present. - // `m` holds the message we are receiving, which will - // always have the `basic_file_body` as the body type. + // `h` holds the received message headers. + // `b` is an instance of `basic_file_body`. // template<bool isRequest, class Fields> explicit - reader( - message<isRequest, basic_file_body, Fields>& m); + reader(header<isRequest, Fields>&h, value_type& b); // Initializer // @@ -447,9 +447,10 @@ template<class File> template<bool isRequest, class Fields> basic_file_body<File>:: reader:: -reader(message<isRequest, basic_file_body, Fields>& m) - : body_(m.body()) +reader(header<isRequest, Fields>& h, value_type& body) + : body_(body) { + boost::ignore_unused(h); } template<class File> |