mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 04:47:29 +02:00
basic_parser returns error::header_limit ealier
This commit is contained in:
committed by
Mohammad Nejati
parent
a9c4a19f26
commit
f181fbf6e4
@ -843,6 +843,22 @@ public:
|
||||
p.put(b.data(), ec);
|
||||
BEAST_EXPECTS(ec == error::header_limit, ec.message());
|
||||
}
|
||||
{
|
||||
multi_buffer b;
|
||||
ostream(b) <<
|
||||
"POST / HTTP/1.1\r\n";
|
||||
error_code ec;
|
||||
test_parser<true> p;
|
||||
p.header_limit(18);
|
||||
p.eager(true);
|
||||
b.consume(p.put(b.data(), ec));
|
||||
BEAST_EXPECTS(ec == error::need_more, ec.message());
|
||||
ostream(b) <<
|
||||
"field: value\r\n";
|
||||
b.consume(p.put(b.data(), ec));
|
||||
BEAST_EXPECT(! p.is_done());
|
||||
BEAST_EXPECTS(ec == error::header_limit, ec.message());
|
||||
}
|
||||
{
|
||||
multi_buffer b;
|
||||
ostream(b) <<
|
||||
|
Reference in New Issue
Block a user