mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 21:07:26 +02:00
Fix signature for async_read_some, and tests
Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
committed by
Vinnie Falco
parent
a1db3cab9f
commit
f96785df4f
@ -2,6 +2,7 @@ Version 140:
|
||||
|
||||
* Fix some integer warnings in 64-bit builds
|
||||
* Fix utf8_checker test failures
|
||||
* Fix signature for async_read_some, and tests
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@ -536,7 +536,8 @@ async_read_some(
|
||||
boost::asio::is_dynamic_buffer<DynamicBuffer>::value,
|
||||
"DynamicBuffer requirements not met");
|
||||
BOOST_ASSERT(! parser.is_done());
|
||||
boost::asio::async_completion<ReadHandler, void(error_code)> init{handler};
|
||||
boost::asio::async_completion<ReadHandler,
|
||||
void(error_code, std::size_t)> init{handler};
|
||||
detail::read_some_op<AsyncReadStream,
|
||||
DynamicBuffer, isRequest, Derived, BOOST_ASIO_HANDLER_TYPE(
|
||||
ReadHandler, void(error_code, std::size_t))>{
|
||||
|
@ -311,6 +311,25 @@ public:
|
||||
break;
|
||||
}
|
||||
BEAST_EXPECT(n < limit);
|
||||
|
||||
for(n = 0; n < limit; ++n)
|
||||
{
|
||||
test::fail_counter fc{n};
|
||||
test::stream c{ioc_, fc,
|
||||
"GET / HTTP/1.1\r\n"
|
||||
"Host: localhost\r\n"
|
||||
"User-Agent: test\r\n"
|
||||
"Content-Length: 0\r\n"
|
||||
"\r\n"
|
||||
};
|
||||
request_parser<dynamic_body> m;
|
||||
error_code ec = test::error::fail_error;
|
||||
multi_buffer b;
|
||||
async_read_some(c, b, m, do_yield[ec]);
|
||||
if(! ec)
|
||||
break;
|
||||
}
|
||||
BEAST_EXPECT(n < limit);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user