Set parser status and flags even if body_limit_ has been reached

close #1556
This commit is contained in:
Mohamed El Housseine authored and Vinnie Falco committed 2019-04-08 17:14:46 -07:00
1 parent bc9f63f10d
commit ebe52537ea
1 file changed
+6 -5
@@ -508,15 +508,16 @@ finish_header(error_code& ec, std::false_type)
}
else if(f_ & flagContentLength)
{
if(len_ > body_limit_)
{
ec = error::body_limit;
return;
}
if(len_ > 0)
{
f_ |= flagHasBody;
state_ = state::body0;
if(len_ > body_limit_)
{
ec = error::body_limit;
return;
}
}
else
{