Fix erroneous error when HTTP body_limit is none

fixes #2070
closes #2073
This commit is contained in:
Richard Hodges
2020-08-28 13:26:59 +02:00
parent d04ff199bb
commit 9e6822773e
3 changed files with 24 additions and 3 deletions
+18
View File
@@ -1500,6 +1500,23 @@ public:
}
}
void
testUnlimitedBody()
{
const char data[] =
"POST / HTTP/1.1\r\n"
"Content-Length: 5\r\n"
"\r\n"
"*****";
test::fail_count fc(1000);
test_parser<true> p(fc);
p.body_limit(none);
error_code ec;
p.put(net::buffer(data, strlen(data)), ec);
BEAST_EXPECTS(!ec, ec.message());
}
//--------------------------------------------------------------------------
void
@@ -1528,6 +1545,7 @@ public:
testIssue1267();
testChunkedOverflow();
testChunkedBodySize();
testUnlimitedBody();
}
};