forked from boostorg/beast
Return std::size_t from Body::writer::put (API Change)
`put` returns the number of bytes actually transferred from the input buffers. Actions Required: * Return the number of bytes actually transferred from the input buffers in user defined `Body::writer::put` functions.
This commit is contained in:
1 parent
f3afc834b1
commit
c149321013
19 files changed
+179
-55
No files matched your search
@@ -120,7 +120,7 @@ struct mutable_body
|
||||
}
|
||||
|
||||
template<class ConstBufferSequence>
|
||||
void
|
||||
std::size_t
|
||||
put(ConstBufferSequence const& buffers,
|
||||
beast::error_code& ec)
|
||||
{
|
||||
@@ -135,10 +135,10 @@ struct mutable_body
|
||||
catch(std::length_error const&)
|
||||
{
|
||||
ec = beast::http::error::buffer_overflow;
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
ec.assign(0, ec.category());
|
||||
buffer_copy(boost::asio::buffer(
|
||||
return buffer_copy(boost::asio::buffer(
|
||||
&body_[0] + len, n), buffers);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user