Copy data to beginning of buffer, not end. (#2542)
Copy data to beginning of buffer, not end.
This commit is contained in:
@@ -105,11 +105,10 @@ void RequestHandler::HandleRequest(const http::request ¤t_request, http::r
|
||||
else
|
||||
{
|
||||
BOOST_ASSERT(result.is<std::string>());
|
||||
current_reply.content.resize(current_reply.content.size() +
|
||||
result.get<std::string>().size());
|
||||
current_reply.content.resize(result.get<std::string>().size());
|
||||
std::copy(result.get<std::string>().cbegin(),
|
||||
result.get<std::string>().cend(),
|
||||
current_reply.content.end());
|
||||
current_reply.content.begin());
|
||||
|
||||
current_reply.headers.emplace_back("Content-Type", "application/x-protobuf");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user