mirror of
https://github.com/boostorg/beast.git
synced 2025-08-04 07:14:32 +02:00
Set parser status and flags even if body_limit_ has been reached
close #1556
This commit is contained in:
committed by
Vinnie Falco
parent
bc9f63f10d
commit
ebe52537ea
@@ -508,15 +508,16 @@ finish_header(error_code& ec, std::false_type)
|
|||||||
}
|
}
|
||||||
else if(f_ & flagContentLength)
|
else if(f_ & flagContentLength)
|
||||||
{
|
{
|
||||||
if(len_ > body_limit_)
|
|
||||||
{
|
|
||||||
ec = error::body_limit;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(len_ > 0)
|
if(len_ > 0)
|
||||||
{
|
{
|
||||||
f_ |= flagHasBody;
|
f_ |= flagHasBody;
|
||||||
state_ = state::body0;
|
state_ = state::body0;
|
||||||
|
|
||||||
|
if(len_ > body_limit_)
|
||||||
|
{
|
||||||
|
ec = error::body_limit;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user