mirror of
https://github.com/boostorg/beast.git
synced 2025-08-02 14:24:31 +02:00
@@ -1,3 +1,4 @@
|
|||||||
|
* Extra logic error detection in http parser.
|
||||||
* Move Windows CI to Drone.
|
* Move Windows CI to Drone.
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
@@ -82,7 +82,17 @@ basic_parser<isRequest>::
|
|||||||
put(net::const_buffer buffer,
|
put(net::const_buffer buffer,
|
||||||
error_code& ec)
|
error_code& ec)
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(state_ != state::complete);
|
// If this goes off you have tried to parse more data after the parser
|
||||||
|
// has completed. A common cause of this is re-using a parser, which is
|
||||||
|
// not supported. If you need to re-use a parser, consider storing it
|
||||||
|
// in an optional. Then reset() and emplace() prior to parsing each new
|
||||||
|
// message.
|
||||||
|
BOOST_ASSERT(!is_done());
|
||||||
|
if (is_done())
|
||||||
|
{
|
||||||
|
ec = error::stale_parser;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
auto p = static_cast<char const*>(buffer.data());
|
auto p = static_cast<char const*>(buffer.data());
|
||||||
auto n = buffer.size();
|
auto n = buffer.size();
|
||||||
auto const p0 = p;
|
auto const p0 = p;
|
||||||
|
Reference in New Issue
Block a user