forked from boostorg/beast
Fix erroneous error when HTTP body_limit is none
fixes #2070 closes #2073
This commit is contained in:
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user