Client: async request handlers are now called multiple times if response content is larger than Config::max_response_streambuf_size. Also improved streambuf to streambuf copy, and streambuf to string copy. Finally, string() functions no longer consume streambuf.
This commit is contained in:
parent
5544612a19
commit
3be67623fa
5 changed files with 285 additions and 146 deletions
|
|
@ -85,7 +85,7 @@ namespace SimpleWeb {
|
|||
if(!lock)
|
||||
return;
|
||||
if(!ec) {
|
||||
std::shared_ptr<Response> response(new Response(this->config.max_response_streambuf_size));
|
||||
std::shared_ptr<Response> response(new Response(this->config.max_response_streambuf_size, session->connection));
|
||||
session->connection->set_timeout(this->config.timeout_connect);
|
||||
asio::async_read_until(session->connection->socket->next_layer(), response->streambuf, "\r\n\r\n", [this, session, response](const error_code &ec, std::size_t /*bytes_transferred*/) {
|
||||
session->connection->cancel_timeout();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue